Build failure with stricter C compilers (e.g. GCC 14)
Modern C compilers are becoming stricter with a variety of changes over the last year or so.
GCC 14 in particular (to be released in ~April 2024) fails to build xkbutils-1.0.5 like:
xkbwatch.c:92:34: error: passing argument 7 of ‘XtOpenApplication’ from incompatible pointer type [-Wincompatible-pointer-types]
92 | fallback_resources,
| ^~~~~~~~~~~~~~~~~~
| |
| char **
In file included from xkbwatch.c:31:
/usr/include/X11/Intrinsic.h:1473:5: note: expected ‘const char **’ but argument is of type ‘char **’
1473 | String* /* fallback_resources */,
| ^~~~~~~ ^
Originally reported downstream in Gentoo at https://bugs.gentoo.org/919190.
This can be emulated with -Werror=incompatible-pointer-types -Werror=implicit -Werror=int-conversion
on an older GCC or Clang.