[telepathy-glib/master] TpIntSet, TpHandleSet: warn if some functions with no side-effects have their results ignored
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Dec 18 09:46:32 PST 2009
That'd be harmless but nonsensical.
---
telepathy-glib/handle-repo.h | 4 ++--
telepathy-glib/intset.h | 8 +++++---
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/telepathy-glib/handle-repo.h b/telepathy-glib/handle-repo.h
index b0de534..eb675fe 100644
--- a/telepathy-glib/handle-repo.h
+++ b/telepathy-glib/handle-repo.h
@@ -97,7 +97,7 @@ gboolean tp_handles_client_release (TpHandleRepoIface *self,
const gchar *client, const GArray *handles, GError **error);
const char *tp_handle_inspect (TpHandleRepoIface *self,
- TpHandle handle);
+ TpHandle handle) G_GNUC_WARN_UNUSED_RESULT;
TpHandle tp_handle_lookup (TpHandleRepoIface *self,
const gchar *id, gpointer context, GError **error);
TpHandle tp_handle_ensure (TpHandleRepoIface *self,
@@ -127,7 +127,7 @@ TpHandleSet * tp_handle_set_new (TpHandleRepoIface *repo)
G_GNUC_WARN_UNUSED_RESULT;
void tp_handle_set_destroy (TpHandleSet *set);
-TpIntSet *tp_handle_set_peek (TpHandleSet *set);
+TpIntSet *tp_handle_set_peek (TpHandleSet *set) G_GNUC_WARN_UNUSED_RESULT;
void tp_handle_set_add (TpHandleSet *set, TpHandle handle);
gboolean tp_handle_set_remove (TpHandleSet *set, TpHandle handle);
diff --git a/telepathy-glib/intset.h b/telepathy-glib/intset.h
index 80403e8..23ab030 100644
--- a/telepathy-glib/intset.h
+++ b/telepathy-glib/intset.h
@@ -51,16 +51,18 @@ void tp_intset_clear (TpIntSet *set);
void tp_intset_add (TpIntSet *set, guint element);
gboolean tp_intset_remove (TpIntSet *set, guint element);
-gboolean tp_intset_is_member (const TpIntSet *set, guint element);
+gboolean tp_intset_is_member (const TpIntSet *set, guint element)
+ G_GNUC_WARN_UNUSED_RESULT;
void tp_intset_foreach (const TpIntSet *set, TpIntFunc func,
gpointer userdata);
GArray *tp_intset_to_array (const TpIntSet *set) G_GNUC_WARN_UNUSED_RESULT;
TpIntSet *tp_intset_from_array (const GArray *array) G_GNUC_WARN_UNUSED_RESULT;
-guint tp_intset_size (const TpIntSet *set);
+guint tp_intset_size (const TpIntSet *set) G_GNUC_WARN_UNUSED_RESULT;
-gboolean tp_intset_is_equal (const TpIntSet *left, const TpIntSet *right);
+gboolean tp_intset_is_equal (const TpIntSet *left, const TpIntSet *right)
+ G_GNUC_WARN_UNUSED_RESULT;
TpIntSet *tp_intset_copy (const TpIntSet *orig) G_GNUC_WARN_UNUSED_RESULT;
TpIntSet *tp_intset_intersection (const TpIntSet *left, const TpIntSet *right)
--
1.5.6.5
More information about the telepathy-commits
mailing list