mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
Add G_GNUC_BEGIN/END_IGNORE_DEPRECATIONS
Add new macros to disable -Wdeprecated-declarations around a piece of code, using the C99 (and GNU89) _Pragma() operator. Replace the existing use of #pragma for this in gio, and suppress the warnings in gvaluearray.c as well. https://bugzilla.gnome.org/show_bug.cgi?id=669671
This commit is contained in:
@@ -228,7 +228,9 @@ g_value_array_prepend (GValueArray *value_array,
|
||||
{
|
||||
g_return_val_if_fail (value_array != NULL, NULL);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
return g_value_array_insert (value_array, 0, value);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -249,7 +251,9 @@ g_value_array_append (GValueArray *value_array,
|
||||
{
|
||||
g_return_val_if_fail (value_array != NULL, NULL);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
return g_value_array_insert (value_array, value_array->n_values, value);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user