44.alpha: build fails
With new glibc (available now in fedora rawhide) it is possible to build with -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3
in $CFLAGS which causes that some warnings are turned into errors.
Here is result
[tkloczko@pers-jacek x86_64-redhat-linux-gnu]$ ninja -k 0
[1/2] Compiling C object src/file-roller.p/fr-window.c.o
FAILED: src/file-roller.p/fr-window.c.o
/usr/bin/gcc -Isrc/file-roller.p -Isrc -I../src -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -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/graphene-1.0 -I/usr/lib64/graphene-1.0/include -I/usr/include/libadwaita-1 -I/usr/include/json-glib-1.0 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -Os -mfpmath=sse -msse -msse2 -mfpmath=sse -msse -msse2 -mfpmath=sse -msse -msse2 -pthread -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_38 -Wall -Wno-deprecated-declarations -MD -MQ src/file-roller.p/fr-window.c.o -MF src/file-roller.p/fr-window.c.o.d -o src/file-roller.p/fr-window.c.o -c ../src/fr-window.c
../src/fr-window.c: In function ‘fr_window_construct’:
../src/fr-window.c:4738:42: error: initialization of ‘AdwClamp *’ {aka ‘struct _AdwClamp *’} from incompatible pointer type ‘GtkWidget *’ {aka ‘struct _GtkWidget *’} [-Wincompatible-pointer-types]
4738 | AdwClamp *filter_entry_limiter = adw_clamp_new ();
| ^~~~~~~~~~~~~
../src/fr-window.c:4748:73: error: passing argument 2 of ‘gtk_search_bar_set_child’ from incompatible pointer type [-Wincompatible-pointer-types]
4748 | gtk_search_bar_set_child (GTK_SEARCH_BAR (private->filter_bar), filter_entry_limiter);
| ^~~~~~~~~~~~~~~~~~~~
| |
| AdwClamp * {aka struct _AdwClamp *}
In file included from /usr/include/gtk-4.0/gtk/gtk.h:231,
from /usr/include/libadwaita-1/adwaita.h:9,
from ../src/fr-window.c:23:
/usr/include/gtk-4.0/gtk/gtksearchbar.h:75:62: note: expected ‘GtkWidget *’ {aka ‘struct _GtkWidget *’} but argument is of type ‘AdwClamp *’ {aka ‘struct _AdwClamp *’}
75 | GtkWidget *child);
| ~~~~~~~~~~~~~~^~~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:26,
from /usr/include/glib-2.0/gobject/gbinding.h:31,
from /usr/include/glib-2.0/glib-object.h:24,
from /usr/include/gtk-4.0/gtk/css/gtkcssenumtypes.h:11,
from /usr/include/gtk-4.0/gtk/css/gtkcss.h:33,
from /usr/include/gtk-4.0/gtk/gtk.h:29:
/usr/include/glib-2.0/gobject/gtype.h:2656:42: error: passing argument 1 of ‘gtk_widget_set_tooltip_text’ from incompatible pointer type [-Wincompatible-pointer-types]
2656 | # define _G_TYPE_CIC(ip, gt, ct) ((ct*) (void *) ip)
/usr/include/glib-2.0/gobject/gtype.h:528:66: note: in expansion of macro ‘_G_TYPE_CIC’
528 | #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
| ^~~~~~~~~~~
/usr/include/gtk-4.0/gtk/gtkbutton.h:37:42: note: in expansion of macro ‘G_TYPE_CHECK_INSTANCE_CAST’
37 | #define GTK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_BUTTON, GtkButton))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fr-window.c:4863:38: note: in expansion of macro ‘GTK_BUTTON’
4863 | gtk_widget_set_tooltip_text (GTK_BUTTON (button), _("Extract Files"));
| ^~~~~~~~~~
In file included from /usr/include/gtk-4.0/gtk/gtkapplication.h:26,
from /usr/include/gtk-4.0/gtk/gtkwindow.h:32,
from /usr/include/gtk-4.0/gtk/gtkaboutdialog.h:29,
from /usr/include/gtk-4.0/gtk/gtk.h:33:
/usr/include/gtk-4.0/gtk/gtkwidget.h:682:71: note: expected ‘GtkWidget *’ {aka ‘struct _GtkWidget *’} but argument is of type ‘GtkButton *’ {aka ‘struct _GtkButton *’}
682 | void gtk_widget_set_tooltip_text (GtkWidget *widget,
| ~~~~~~~~~~~~~^~~~~~
ninja: build stopped: cannot make progress due to previous errors.