Closed thesamesam closed 2 weeks ago
I see one more warning with -Werror=incompatible-pointer-types
make[2]: Entering directory '/builddir/build/BUILD/lxterminal-0.4.0-20230917git9b4299c2/lxterminal/src'
lxterminal.c: In function ‘terminal_new’:
lxterminal.c:1233:24: warning: passing argument 2 of ‘gtk_style_context_add_provider’ from incompatible pointer type [-Wincompatible-pointer-types]
1233 | box_style_ctx, box_css_provider,
| ^~~~~~~~~~~~~~~~
| |
| GtkCssProvider * {aka struct _GtkCssProvider *}
In file included from /usr/include/gtk-3.0/gtk/gtkicontheme.h:27,
from /usr/include/gtk-3.0/gtk/gtk.h:127,
from lxterminal.c:28:
/usr/include/gtk-3.0/gtk/gtkstylecontext.h:1034:59: note: expected ‘GtkStyleProvider *’ {aka ‘struct _GtkStyleProvider *’} but argument is of type ‘GtkCssProvider *’ {aka ‘struct _GtkCssProvider *’}
1034 | GtkStyleProvider *provider,
| ~~~~~~~~~~~~~~~~~~^~~~~~~~
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 lxterminal-0.4.0 like:
Originally reported downstream in Gentoo at https://bugs.gentoo.org/919094.
This can be emulated with
-Werror=incompatible-pointer-types -Werror=implicit -Werror=int-conversion
on an older GCC or Clang.