I recently packaged this for Alpine Linux, and noticed that, with our default build configuration, there are quite a few -Wincompatible-pointer-types errors—essentially everywhere that the noop function pointer is used. This doesn't happen with CC=c99, the default for .POSIX:, but does with -std=c23, which is the default standard for recent versions of GCC (though not yet Clang):
dam.c:500:24: error: initialization of 'void (*)(void *, struct wl_output *, const char *)' from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types]
500 | .description = noop,
| ^~~~
dam.c:500:24: note: (near initialization for 'output_listener.description')
(Trimmed for brevity, full log available here.)
In my case, I just added -Wno-incompatible-pointer-types to CFLAGS, but specifying an earlier standard in the Makefile or manually casting each assignment of noop would also work.
I recently packaged this for Alpine Linux, and noticed that, with our default build configuration, there are quite a few `-Wincompatible-pointer-types` errors—essentially everywhere that the `noop` function pointer is used. This doesn't happen with `CC=c99`, the default for `.POSIX:`, but does with `-std=c23`, which is the default standard for recent versions of GCC (though not yet Clang):
> ```
> dam.c:500:24: error: initialization of 'void (*)(void *, struct wl_output *, const char *)' from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types]
> 500 | .description = noop,
> | ^~~~
> dam.c:500:24: note: (near initialization for 'output_listener.description')
> ```
(Trimmed for brevity, full log available [here](https://paste.sr.ht/blob/4afb6d572567023db66a79a62b3b825ad6c1215b).)
In my case, I just added `-Wno-incompatible-pointer-types` to `CFLAGS`, but specifying an earlier standard in the Makefile or manually casting each assignment of `noop` would also work.