On latest Gtk2 the following warnings in main.c and gui.c cause the
build to fail if warn-error is enabled.
In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,
from /usr/include/gtk-2.0/gtk/gtkwidget.h:36,
from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35,
from /usr/include/gtk-2.0/gtk/gtkbin.h:35,
from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:33,
from gui.c:82:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:236:1: warning: ‘GTypeDebugFlags’ is deprecated
[-Wdeprecated-declarations]
236 | void gtk_type_init (GTypeDebugFlags debug_flags);
| ^~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:23,
from /usr/include/glib-2.0/gio/gioenums.h:28,
from /usr/include/glib-2.0/gio/giotypes.h:28,
from /usr/include/glib-2.0/gio/gio.h:26,
from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
from /usr/include/gtk-2.0/gdk/gdk.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:32,
from gui.c:82:
/usr/include/glib-2.0/gobject/gtype.h:677:1: note: declared here
677 | {
| ^
---
p2v/gui.c | 1 +
p2v/main.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/p2v/gui.c b/p2v/gui.c
index 32c56dda7..a15ea053e 100644
--- a/p2v/gui.c
+++ b/p2v/gui.c
@@ -76,6 +76,7 @@
/* errors in <gtk.h> */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#if defined(__GNUC__) && __GNUC__ >= 6 /* gcc >= 6 */
#pragma GCC diagnostic ignored "-Wshift-overflow"
#endif
diff --git a/p2v/main.c b/p2v/main.c
index 424bccfb3..150037517 100644
--- a/p2v/main.c
+++ b/p2v/main.c
@@ -43,6 +43,7 @@
/* errors in <gtk.h> */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#if defined(__GNUC__) && __GNUC__ >= 6 /* gcc >= 6 */
#pragma GCC diagnostic ignored "-Wshift-overflow"
#endif
--
2.23.0