EionRobb / purple-googlechat

A Google Chat protocol plugin for libpurple/Pidgin/bitlbee/whatever
GNU General Public License v3.0
112 stars 13 forks source link

'g_memdup' is deprecated #72

Open UnitedMarsupials opened 1 year ago

UnitedMarsupials commented 1 year ago

Compiling against glib-2.72.3 today, I get multiple compiler-warnings about g_memdup being deprecated:

googlechat_events.c:269:37: warning: 'g_memdup' is deprecated: Use 'g_memdup2' instead [-Wdeprecated-declarations]
        image = purple_image_new_from_data(g_memdup(response_data, response_size), response_size);
                                           ^
/opt/include/glib-2.0/glib/gstrfuncs.h:256:1: note: 'g_memdup' has been explicitly marked deprecated here
GLIB_DEPRECATED_IN_2_68_FOR (g_memdup2)
^
/opt/include/glib-2.0/glib/gversionmacros.h:1067:49: note: expanded from macro 'GLIB_DEPRECATED_IN_2_68_FOR'
# define GLIB_DEPRECATED_IN_2_68_FOR(f)         GLIB_DEPRECATED_FOR(f)
                                                ^
/opt/include/glib-2.0/glib/gmacros.h:1145:32: note: expanded from macro 'GLIB_DEPRECATED_FOR'
#define GLIB_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _GLIB_EXTERN
                               ^
/opt/include/glib-2.0/glib/gmacros.h:1113:44: note: expanded from macro 'G_DEPRECATED_FOR'
#define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead")))