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 zenity-3.99.90 like:
FAILED: src/zenity.p/text.c.o
x86_64-pc-linux-gnu-gcc -Isrc/zenity.p -Isrc -I../zenity-3.99.90/src -I. -I../zenity-3.99.90 -I/usr/include/libadwaita-1 -I/usr/include/gtk-4.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/graphene-1.0 -I/usr/lib64/graphene-1.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libpng16 -I/usr/include/pixman-1 -I/usr/include/fribidi -I/usr/include/appstream -I/usr/include/libmount -I/usr/include/blkid -I/usr/lib64/libffi/include -I/usr/include/webkitgtk-6.0 -I/usr/include/libsoup-3.0 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror=implicit -Wformat=2 -O2 -pipe -march=native -fdiagnostics-color=always -mfpmath=sse -msse -msse2 -pthread -mfpmath=sse -msse -msse2 '-DG_LOG_DOMAIN="Zenity"' -MD -MQ src/zenity.p/text.c.o -MF src/zenity.p/text.c.o.d -o src/zenity.p/text.c.o -c ../zenity-3.99.90/src/text.c
../zenity-3.99.90/src/text.c: In function ‘zenity_text’:
../zenity-3.99.90/src/text.c:368:25: error: assignment to ‘GtkWidget *’ {aka ‘struct _GtkWidget *’} from incompatible pointer type ‘WebKitWebView *’ {aka ‘struct _WebKitWebView *’} [-Wincompatible-pointer-types]
368 | web_kit = WEBKIT_WEB_VIEW (g_object_new (WEBKIT_TYPE_WEB_VIEW,
|
Originally reported downstream in Gentoo at https://bugs.gentoo.org/919083.
This can be emulated with -Werror=incompatible-pointer-types -Werror=implicit -Werror=int-conversion
on an older GCC or Clang.
(PS: wrt 5273c30a, your wish is granted, and GCC 14 does that too