mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +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:
@@ -3352,6 +3352,8 @@ get_all_desktop_entries_for_mime_type (const char *base_mime_type,
|
||||
|
||||
/* GDesktopAppInfoLookup interface: */
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
typedef GDesktopAppInfoLookupIface GDesktopAppInfoLookupInterface;
|
||||
G_DEFINE_INTERFACE (GDesktopAppInfoLookup, g_desktop_app_info_lookup, G_TYPE_OBJECT)
|
||||
|
||||
@@ -3378,8 +3380,6 @@ g_desktop_app_info_lookup_default_init (GDesktopAppInfoLookupInterface *iface)
|
||||
*
|
||||
* Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio.
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
GAppInfo *
|
||||
g_desktop_app_info_lookup_get_default_for_uri_scheme (GDesktopAppInfoLookup *lookup,
|
||||
const char *uri_scheme)
|
||||
@@ -3392,4 +3392,5 @@ g_desktop_app_info_lookup_get_default_for_uri_scheme (GDesktopAppInfoLookup *loo
|
||||
|
||||
return (* iface->get_default_for_uri_scheme) (lookup, uri_scheme);
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
@@ -809,8 +809,6 @@ DllMain (HINSTANCE hinstDLL,
|
||||
|
||||
#endif
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
void
|
||||
_g_io_modules_ensure_extension_points_registered (void)
|
||||
{
|
||||
@@ -826,7 +824,9 @@ _g_io_modules_ensure_extension_points_registered (void)
|
||||
#ifdef G_OS_UNIX
|
||||
#if !GLIB_CHECK_VERSION (3, 0, 0)
|
||||
ep = g_io_extension_point_register (G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME);
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
g_io_extension_point_set_required_type (ep, G_TYPE_DESKTOP_APP_INFO_LOOKUP);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -863,7 +863,6 @@ _g_io_modules_ensure_extension_points_registered (void)
|
||||
|
||||
G_UNLOCK (registered_extensions);
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
void
|
||||
_g_io_modules_ensure_loaded (void)
|
||||
|
Reference in New Issue
Block a user