Commit Graph

15 Commits

Author SHA1 Message Date
4ffa09316d Ensure ‘new_mode’ is initialized; fixes compiler warning
wlopm.c: In function ‘sync_handle_done’:
wlr-output-power-management-unstable-v1.h:295:9: error: ‘new_mode’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  295 |         wl_proxy_marshal((struct wl_proxy *) zwlr_output_power_v1,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  296 |                          ZWLR_OUTPUT_POWER_V1_SET_MODE, mode);
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wlopm.c:178:40: note: ‘new_mode’ was declared here
  178 |         enum zwlr_output_power_v1_mode new_mode;
      |                                        ^~~~~~~~
2021-08-06 23:31:25 +02:00
a385b761bd Append to CFLAGS, instead of replacing them
The makefile already use (directly, or indirectly) CPPFLAGS and
LDFLAGS, so it makes sense to also use the user provided CFLAGS.

One example where this is necessary is if the user has set
CPPFLAGS=”-D_FORTIFY_SOURCE=2”, which, before this patch, results
in (even if the user has set CFLAGS=-O2):

/usr/include/features.h:397:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) -Werror=cpp]
2021-08-06 23:30:59 +02:00
06b9e5aa17 Add sourcehut build job 2021-08-05 22:07:53 +02:00
2d1cbc900f Merge branch 'manpage' 2021-07-17 15:41:59 +02:00
04e93cacd7 Make man page follow convention 2021-07-17 15:39:06 +02:00
2d574029fc Make compiler flags more aggressive 2021-06-29 15:51:02 +02:00
ec680722d4 Use function for json error messages 2021-06-21 16:10:46 +02:00
fec8a5db3d Accept * as parameter to operate on all outputs 2021-06-21 16:06:20 +02:00
f968900de8 Better commandline interface, support multiple operations 2021-06-17 18:17:20 +02:00
7ec9605b11 Fix Makefile 2021-06-15 14:59:46 +00:00
cea679c1a3 Add json output mode 2021-06-15 13:32:26 +00:00
22f87adf6c Add "toggle" operation 2021-06-14 23:47:49 +00:00
e3f245394a Fix segfault when required protocol not supported 2021-06-14 23:08:38 +00:00
ff86018415 Implement everything 2021-06-14 21:35:52 +00:00
9ebfde9697 init 2021-06-14 21:35:38 +00:00