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 xdm-1.1.14 like:
chooser.c: In function ‘RebuildTable’:
chooser.c:280:26: error: passing argument 2 of ‘XawListChange’ from incompatible pointer type [-Wincompatible-pointer-types]
280 | XawListChange (list, newTable, size, 0, TRUE);
| ^~~~~~~~
| |
| char **
In file included from chooser.c:59:
/usr/include/X11/Xaw/List.h:170:27: note: expected ‘const char **’ but argument is of type ‘char **’
170 | _Xconst char **list,
| ^ ^
Originally reported downstream in Gentoo at https://bugs.gentoo.org/919207.
This can be emulated with -Werror=incompatible-pointer-types -Werror=implicit -Werror=int-conversion
on an older GCC or Clang.