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:
Dan Winship
2012-02-10 08:49:17 -05:00
parent ab59739e11
commit ca05902a58
6 changed files with 56 additions and 6 deletions

View File

@@ -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
}
/**