Sending a handler with incompatible pointer types is undefined
behavior, so this removes noop() and implements empty handlers for all
of its previous uses.
This used to work until C23.
I needed to patch this to package wlopm for chimera linux, which uses
FreeBSD's coreutils. Apparently -D is not portable, it means something
different for FreeBSD install.
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;
| ^~~~~~~~
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]