morgant / xwf

X Window Filemanager
GNU General Public License v2.0
6 stars 0 forks source link

GTimeVal is deprecated #3

Open morgant opened 3 years ago

morgant commented 3 years ago

There are tons of warnings like the following:

In file included from xwf-src/xwf_misc.c:22:
In file included from /usr/local/include/gtk-2.0/gtk/gtk.h:126:
In file included from /usr/local/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30:
In file included from /usr/local/include/gtk-2.0/gtk/gtktoolbutton.h:30:
In file included from /usr/local/include/gtk-2.0/gtk/gtktoolitem.h:31:
/usr/local/include/gtk-2.0/gtk/gtktooltips.h:73:3: warning: 'GTimeVal' is deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations]
  GTimeVal last_popdown;
  ^
/usr/local/include/glib-2.0/glib/gtypes.h:545:35: note: 'GTimeVal' has been explicitly marked deprecated here
typedef struct _GTimeVal GTimeVal GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime);
                                  ^
/usr/local/include/glib-2.0/glib/gversionmacros.h:923:49: note: expanded from macro 'GLIB_DEPRECATED_TYPE_IN_2_62_FOR'
# define GLIB_DEPRECATED_TYPE_IN_2_62_FOR(f)    GLIB_DEPRECATED_TYPE_FOR(f)
                                                ^
/usr/local/include/glib-2.0/glib/gmacros.h:1018:37: note: expanded from macro 'GLIB_DEPRECATED_TYPE_FOR'
#define GLIB_DEPRECATED_TYPE_FOR(f) G_DEPRECATED_FOR(f)
                                    ^
/usr/local/include/glib-2.0/glib/gmacros.h:952:44: note: expanded from macro 'G_DEPRECATED_FOR'
#define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead")))

There's a good overview here, incl. required fixes. That said, like in the above example, most of the warnings seem to be in GTK+ 2.x files, so we won't be able to fix those.