mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 22:46:15 +01:00
Merge branch 'gstring-free-unused-result' into 'main'
gstring: fix unused-result warning with g_string_free() in C++ See merge request GNOME/glib!4182
This commit is contained in:
commit
d9b2d097b4
@ -66,6 +66,8 @@ gchar* g_string_free_and_steal (GString *string) G_GNUC_WARN_UN
|
||||
|
||||
#if G_GNUC_CHECK_VERSION (2, 0) && (GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_76)
|
||||
|
||||
#if !defined(__cplusplus) || !G_GNUC_CHECK_VERSION (6, 1) || G_GNUC_CHECK_VERSION (7, 3)
|
||||
|
||||
#define g_string_free(str, free_segment) \
|
||||
(__builtin_constant_p (free_segment) ? \
|
||||
((free_segment) ? \
|
||||
@ -74,6 +76,8 @@ gchar* g_string_free_and_steal (GString *string) G_GNUC_WARN_UN
|
||||
: \
|
||||
(g_string_free) ((str), (free_segment)))
|
||||
|
||||
#endif /* !defined(__cplusplus) || !G_GNUC_CHECK_VERSION (6, 1) || G_GNUC_CHECK_VERSION (7, 3) */
|
||||
|
||||
#endif /* G_GNUC_CHECK_VERSION (2, 0) && (GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_76) */
|
||||
|
||||
GLIB_AVAILABLE_IN_2_34
|
||||
|
Loading…
Reference in New Issue
Block a user