[PATCH] libnm-util: add some more introspection annotations to, silence warnings



the warnings were annoying me :)

It doesn't fix everything. These warnings:

nm-ip4-config.h:65: Warning: NMClient: Return value is not superclass
for constructor; symbol='nm_ip4_config_new'
constructed='NMClient.IP4Config' return='GObject.Object'

are only fixed with the very latest gobject-introspection.

These warnings:

<unknown>:: Warning: NetworkManager:
(ErrorQuarkFunction)setting_error_quark:
context=ErrorQuarkFunction('setting_error_quark')
nm_setting_error_quark: Couldn't find corresponding enumeration

aren't fixed. https://bugzilla.gnome.org/show_bug.cgi?id=656506
>From c8457c586afc9d9d3ec36a2b140b450845a68a94 Mon Sep 17 00:00:00 2001
From: Dan Winship <danw gnome org>
Date: Thu, 13 Oct 2011 12:24:04 -0400
Subject: [PATCH] libnm-util: add some more introspection annotations to
 silence warnings

---
 libnm-util/nm-connection.c |    4 ++--
 libnm-util/nm-setting.c    |    8 ++++----
 libnm-util/nm-utils.c      |   10 +++++-----
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/libnm-util/nm-connection.c b/libnm-util/nm-connection.c
index d59c8b4..6a10128 100644
--- a/libnm-util/nm-connection.c
+++ b/libnm-util/nm-connection.c
@@ -975,8 +975,8 @@ nm_connection_clear_secrets (NMConnection *connection)
 /**
  * nm_connection_clear_secrets_with_flags:
  * @connection: the #NMConnection
- * @func: function to be called to determine whether a specific secret should be
- *  cleared or not
+ * @func: (scope call): function to be called to determine whether a
+ *     specific secret should be cleared or not
  * @user_data: caller-supplied data passed to @func
  *
  * Clears and frees secrets determined by @func.
diff --git a/libnm-util/nm-setting.c b/libnm-util/nm-setting.c
index 7ec4278..2b3bdc5 100644
--- a/libnm-util/nm-setting.c
+++ b/libnm-util/nm-setting.c
@@ -308,8 +308,8 @@ nm_setting_get_name (NMSetting *setting)
 /**
  * nm_setting_verify:
  * @setting: the #NMSetting to verify
- * @all_settings: a #GSList of all settings in the connection from which @setting
- * came
+ * @all_settings: (element-type NMSetting): a #GSList of all settings
+ *     in the connection from which @setting came
  * @error: location to store error, or %NULL
  *
  * Validates the setting.  Each setting's properties have allowed values, and
@@ -670,8 +670,8 @@ clear_secrets_with_flags (NMSetting *setting,
 /**
  * nm_setting_clear_secrets_with_flags:
  * @setting: the #NMSetting
- * @func: function to be called to determine whether a specific secret should be
- *  cleared or not
+ * @func: (scope call): function to be called to determine whether a
+ *     specific secret should be cleared or not
  * @user_data: caller-supplied data passed to @func
  *
  * Clears and frees secrets determined by @func.
diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c
index d8bcf34..9d4418e 100644
--- a/libnm-util/nm-utils.c
+++ b/libnm-util/nm-utils.c
@@ -490,7 +490,7 @@ nm_utils_gvalue_hash_dup (GHashTable *hash)
 }
 
 /**
- * nm_utils_slist_free:
+ * nm_utils_slist_free: (skip)
  * @list: a #GSList
  * @elem_destroy_fn: user function called for each element in @list
  *
@@ -1373,7 +1373,7 @@ nm_utils_ip4_addresses_from_gvalue (const GValue *value)
 
 /**
  * nm_utils_ip4_addresses_to_gvalue:
- * @list: a list of #NMIP4Address objects
+ * @list: (element-type NMIP4Address): a list of #NMIP4Address objects
  * @value: a pointer to a #GValue into which to place the converted addresses,
  * which should be unset by the caller (when no longer needed) with
  * g_value_unset().
@@ -1456,7 +1456,7 @@ nm_utils_ip4_routes_from_gvalue (const GValue *value)
 
 /**
  * nm_utils_ip4_routes_to_gvalue:
- * @list: a list of #NMIP4Route objects
+ * @list: (element-type NMIP4Route): a list of #NMIP4Route objects
  * @value: a pointer to a #GValue into which to place the converted routes,
  * which should be unset by the caller (when no longer needed) with
  * g_value_unset().
@@ -1664,7 +1664,7 @@ nm_utils_ip6_addresses_from_gvalue (const GValue *value)
 
 /**
  * nm_utils_ip6_addresses_to_gvalue:
- * @list: a list of #NMIP6Address objects
+ * @list: (element-type NMIP6Address): a list of #NMIP6Address objects
  * @value: a pointer to a #GValue into which to place the converted addresses,
  * which should be unset by the caller (when no longer needed) with
  * g_value_unset().
@@ -1786,7 +1786,7 @@ nm_utils_ip6_routes_from_gvalue (const GValue *value)
 
 /**
  * nm_utils_ip6_routes_to_gvalue:
- * @list: a list of #NMIP6Route objects
+ * @list: (element-type NMIP6Route): a list of #NMIP6Route objects
  * @value: a pointer to a #GValue into which to place the converted routes,
  * which should be unset by the caller (when no longer needed) with
  * g_value_unset().
-- 
1.7.6.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]