summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-08-04 15:25:14 +0200
committerThomas Haller <thaller@redhat.com>2015-08-04 15:59:32 +0200
commite0bded93f347154fdd5e2a5c2811ff49942f24d5 (patch)
tree2718706630ec58511c7278f88ac4296ce4e4eab8
parentf8ae5f1671a5b61b6ed881b31bcd33bb4c864304 (diff)
downloadNetworkManager-e0bded93f347154fdd5e2a5c2811ff49942f24d5.tar.gz
libnm: avoid deprecated warning for NMVpnPluginInfo
When merely including "nm-vpn-plugin-info.h" (or "NetworkManager.h") gcc raises warnings like: "Not available before 1.2 [-Werror=deprecated-declarations]" The problem is that the NMVpnPluginInfo typedef itself is marked as deprecated but also used by other functions like nm_vpn_plugin_info_get_name(). typedef struct { int field; } Foo G_UNAVAILABLE(1,2); G_UNAVAILABLE(1,2) void deprecated_function (Foo *foo); warning: ‘Foo’ is deprecated: Not available before 1.2 [-Wdeprecated-declarations] I think that when a function is itself deprecated, gcc should not warn about the use of a deprecated typedef. Gcc's documentation states: "Note that the warnings only occur for uses and then only if the type is being applied to an identifier that itself is not being declared as deprecated.". Apparently, this only works for structs, but not for typedef of structs. Anyway. Remove the deprecation from NMVpnPluginInfo to avoid the compiler warning. https://bugzilla.gnome.org/show_bug.cgi?id=753098 Fixes: d6226bd987136e35d11f75948f6615c82fea71e0
-rw-r--r--libnm-core/nm-vpn-plugin-info.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm-core/nm-vpn-plugin-info.h b/libnm-core/nm-vpn-plugin-info.h
index 0dcee518b9..def09ab0ef 100644
--- a/libnm-core/nm-vpn-plugin-info.h
+++ b/libnm-core/nm-vpn-plugin-info.h
@@ -47,7 +47,7 @@ G_BEGIN_DECLS
typedef struct {
NM_AVAILABLE_IN_1_2
GObject parent;
-} NMVpnPluginInfo NM_AVAILABLE_IN_1_2;
+} NMVpnPluginInfo;
typedef struct {
NM_AVAILABLE_IN_1_2