[libgdata] Bug 579631 – Add G_GNUC_WARN_UNUSED_RESULT to functions



commit e5ac4b50e82dbbb87b8b4b5afb1dc6cbd408189c
Author: Philip Withnall <philip tecnocode co uk>
Date:   Mon Apr 20 22:14:16 2009 +0100

    Bug 579631 â?? Add G_GNUC_WARN_UNUSED_RESULT to functions
    
    Added G_GNUC_WARN_UNUSED_RESULT attributes to all functions which return
    allocated memory, especially the _insert_entry and _update_entry functions,
    which return the updated entries, which might be missed by some users.
---
 gdata/gdata-atom.h                                |    9 ++++---
 gdata/gdata-entry.h                               |    6 ++--
 gdata/gdata-gdata.h                               |   22 ++++++++++++--------
 gdata/gdata-media-rss.h                           |   17 ++++++++-------
 gdata/gdata-private.h                             |    9 ++++---
 gdata/gdata-query.h                               |    8 +++---
 gdata/gdata-service.h                             |    9 ++++---
 gdata/services/calendar/gdata-calendar-calendar.h |    4 +-
 gdata/services/calendar/gdata-calendar-event.h    |    4 +-
 gdata/services/calendar/gdata-calendar-query.h    |    4 +-
 gdata/services/calendar/gdata-calendar-service.h  |   12 ++++++----
 gdata/services/contacts/gdata-contacts-contact.h  |    6 ++--
 gdata/services/contacts/gdata-contacts-query.h    |    4 +-
 gdata/services/contacts/gdata-contacts-service.h  |    6 +++-
 gdata/services/youtube/gdata-youtube-service.h    |   10 ++++----
 gdata/services/youtube/gdata-youtube-video.h      |    4 +-
 gdata/services/youtube/gdata-youtube.h            |    3 +-
 17 files changed, 75 insertions(+), 62 deletions(-)

diff --git a/gdata/gdata-atom.h b/gdata/gdata-atom.h
index 3f1ceaf..5c8baea 100644
--- a/gdata/gdata-atom.h
+++ b/gdata/gdata-atom.h
@@ -41,7 +41,7 @@ typedef struct {
 	gchar *label;
 } GDataCategory;
 
-GDataCategory *gdata_category_new (const gchar *term, const gchar *scheme, const gchar *label);
+GDataCategory *gdata_category_new (const gchar *term, const gchar *scheme, const gchar *label) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_category_free (GDataCategory *self);
 
 /**
@@ -67,7 +67,8 @@ typedef struct {
 	gint length;
 } GDataLink;
 
-GDataLink *gdata_link_new (const gchar *href, const gchar *rel, const gchar *type, const gchar *hreflang, const gchar *title, gint length);
+GDataLink *gdata_link_new (const gchar *href, const gchar *rel, const gchar *type, const gchar *hreflang,
+			   const gchar *title, gint length) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_link_free (GDataLink *self);
 
 /**
@@ -87,7 +88,7 @@ typedef struct {
 	gchar *email;
 } GDataAuthor;
 
-GDataAuthor *gdata_author_new (const gchar *name, const gchar *uri, const gchar *email);
+GDataAuthor *gdata_author_new (const gchar *name, const gchar *uri, const gchar *email) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_author_free (GDataAuthor *self);
 
 /**
@@ -107,7 +108,7 @@ typedef struct {
 	gchar *name;
 } GDataGenerator;
 
-GDataGenerator *gdata_generator_new (const gchar *name, const gchar *uri, const gchar *version);
+GDataGenerator *gdata_generator_new (const gchar *name, const gchar *uri, const gchar *version) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_generator_free (GDataGenerator *self);
 
 G_END_DECLS
diff --git a/gdata/gdata-entry.h b/gdata/gdata-entry.h
index 969217f..11bf995 100644
--- a/gdata/gdata-entry.h
+++ b/gdata/gdata-entry.h
@@ -74,8 +74,8 @@ typedef struct {
 
 GType gdata_entry_get_type (void) G_GNUC_CONST;
 
-GDataEntry *gdata_entry_new (const gchar *id);
-GDataEntry *gdata_entry_new_from_xml (const gchar *xml, gint length, GError **error);
+GDataEntry *gdata_entry_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT;
+GDataEntry *gdata_entry_new_from_xml (const gchar *xml, gint length, GError **error) G_GNUC_WARN_UNUSED_RESULT;
 
 const gchar *gdata_entry_get_title (GDataEntry *self);
 void gdata_entry_set_title (GDataEntry *self, const gchar *title);
@@ -92,7 +92,7 @@ GDataLink *gdata_entry_look_up_link (GDataEntry *self, const gchar *rel);
 void gdata_entry_add_author (GDataEntry *self, GDataAuthor *author);
 
 gboolean gdata_entry_is_inserted (GDataEntry *self);
-gchar *gdata_entry_get_xml (GDataEntry *self);
+gchar *gdata_entry_get_xml (GDataEntry *self) G_GNUC_WARN_UNUSED_RESULT;
 
 G_END_DECLS
 
diff --git a/gdata/gdata-gdata.h b/gdata/gdata-gdata.h
index 2e8372e..dcb084b 100644
--- a/gdata/gdata-gdata.h
+++ b/gdata/gdata-gdata.h
@@ -45,7 +45,7 @@ typedef struct {
 	gdouble average;
 } GDataGDRating;
 
-GDataGDRating *gdata_gd_rating_new (guint min, guint max, guint num_raters, gdouble average);
+GDataGDRating *gdata_gd_rating_new (guint min, guint max, guint num_raters, gdouble average) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_gd_rating_free (GDataGDRating *self);
 
 /**
@@ -68,7 +68,7 @@ typedef struct {
 	/* TODO: support readOnly and feed */
 } GDataGDFeedLink;
 
-GDataGDFeedLink *gdata_gd_feed_link_new (const gchar *href, const gchar *rel, guint count_hint);
+GDataGDFeedLink *gdata_gd_feed_link_new (const gchar *href, const gchar *rel, guint count_hint) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_gd_feed_link_free (GDataGDFeedLink *self);
 
 /**
@@ -91,7 +91,7 @@ typedef struct {
 	/* TODO: deal with the attendeeType, attendeeStatus and entryLink */
 } GDataGDWho;
 
-GDataGDWho *gdata_gd_who_new (const gchar *rel, const gchar *value_string, const gchar *email);
+GDataGDWho *gdata_gd_who_new (const gchar *rel, const gchar *value_string, const gchar *email) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_gd_who_free (GDataGDWho *self);
 
 /**
@@ -114,7 +114,7 @@ typedef struct {
 	/* TODO: deal with the entryLink */
 } GDataGDWhere;
 
-GDataGDWhere *gdata_gd_where_new (const gchar *rel, const gchar *value_string, const gchar *label);
+GDataGDWhere *gdata_gd_where_new (const gchar *rel, const gchar *value_string, const gchar *label) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_gd_where_free (GDataGDWhere *self);
 
 /**
@@ -137,7 +137,7 @@ typedef struct {
 	gboolean primary;
 } GDataGDEmailAddress;
 
-GDataGDEmailAddress *gdata_gd_email_address_new (const gchar *address, const gchar *rel, const gchar *label, gboolean primary);
+GDataGDEmailAddress *gdata_gd_email_address_new (const gchar *address, const gchar *rel, const gchar *label, gboolean primary) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_gd_email_address_free (GDataGDEmailAddress *self);
 
 /**
@@ -161,7 +161,8 @@ typedef struct {
 	gboolean primary;
 } GDataGDIMAddress;
 
-GDataGDIMAddress *gdata_gd_im_address_new (const gchar *address, const gchar *protocol, const gchar *rel, const gchar *label, gboolean primary);
+GDataGDIMAddress *gdata_gd_im_address_new (const gchar *address, const gchar *protocol, const gchar *rel,
+					   const gchar *label, gboolean primary) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_gd_im_address_free (GDataGDIMAddress *self);
 
 /**
@@ -187,7 +188,8 @@ typedef struct {
 	gboolean primary;
 } GDataGDPhoneNumber;
 
-GDataGDPhoneNumber *gdata_gd_phone_number_new (const gchar *number, const gchar *rel, const gchar *label, const gchar *uri, gboolean primary);
+GDataGDPhoneNumber *gdata_gd_phone_number_new (const gchar *number, const gchar *rel, const gchar *label,
+					       const gchar *uri, gboolean primary) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_gd_phone_number_free (GDataGDPhoneNumber *self);
 
 /**
@@ -210,7 +212,8 @@ typedef struct {
 	gboolean primary;
 } GDataGDPostalAddress;
 
-GDataGDPostalAddress *gdata_gd_postal_address_new (const gchar *address, const gchar *rel, const gchar *label, gboolean primary);
+GDataGDPostalAddress *gdata_gd_postal_address_new (const gchar *address, const gchar *rel, const gchar *label,
+						   gboolean primary) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_gd_postal_address_free (GDataGDPostalAddress *self);
 
 /**
@@ -234,7 +237,8 @@ typedef struct {
 	gboolean primary;
 } GDataGDOrganization;
 
-GDataGDOrganization *gdata_gd_organization_new (const gchar *name, const gchar *title, const gchar *rel, const gchar *label, gboolean primary);
+GDataGDOrganization *gdata_gd_organization_new (const gchar *name, const gchar *title, const gchar *rel,
+						const gchar *label, gboolean primary) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_gd_organization_free (GDataGDOrganization *self);
 
 G_END_DECLS
diff --git a/gdata/gdata-media-rss.h b/gdata/gdata-media-rss.h
index 246d888..5eecee6 100644
--- a/gdata/gdata-media-rss.h
+++ b/gdata/gdata-media-rss.h
@@ -29,7 +29,7 @@ typedef struct {
 	gchar *country;
 } GDataMediaRating;
 
-GDataMediaRating *gdata_media_rating_new (const gchar *scheme, const gchar *country);
+GDataMediaRating *gdata_media_rating_new (const gchar *scheme, const gchar *country) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_media_rating_free (GDataMediaRating *self);
 
 typedef struct {
@@ -37,7 +37,7 @@ typedef struct {
 	gchar *countries;
 } GDataMediaRestriction;
 
-GDataMediaRestriction *gdata_media_restriction_new (const gchar *countries, gboolean relationship);
+GDataMediaRestriction *gdata_media_restriction_new (const gchar *countries, gboolean relationship) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_media_restriction_free (GDataMediaRestriction *self);
 
 typedef struct {
@@ -46,7 +46,7 @@ typedef struct {
 	gchar *category;
 } GDataMediaCategory;
 
-GDataMediaCategory *gdata_media_category_new (const gchar *category, const gchar *label, const gchar *scheme);
+GDataMediaCategory *gdata_media_category_new (const gchar *category, const gchar *label, const gchar *scheme) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_media_category_free (GDataMediaCategory *self);
 
 typedef struct {
@@ -54,7 +54,7 @@ typedef struct {
 	gboolean partner;
 } GDataMediaCredit;
 
-GDataMediaCredit *gdata_media_credit_new (const gchar *credit, gboolean partner);
+GDataMediaCredit *gdata_media_credit_new (const gchar *credit, gboolean partner) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_media_credit_free (GDataMediaCredit *self);
 
 typedef enum {
@@ -72,7 +72,8 @@ typedef struct {
 	gint format; /* TODO: YouTube-specific */
 } GDataMediaContent;
 
-GDataMediaContent *gdata_media_content_new (const gchar *uri, const gchar *type, gboolean is_default, GDataMediaExpression expression, gint duration, gint format);
+GDataMediaContent *gdata_media_content_new (const gchar *uri, const gchar *type, gboolean is_default, GDataMediaExpression expression,
+					    gint duration, gint format) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_media_content_free (GDataMediaContent *self);
 
 typedef struct {
@@ -82,9 +83,9 @@ typedef struct {
 	gint64 time;
 } GDataMediaThumbnail;
 
-GDataMediaThumbnail *gdata_media_thumbnail_new (const gchar *uri, guint width, guint height, gint64 _time);
-gint64 gdata_media_thumbnail_parse_time (const gchar *time_string);
-gchar *gdata_media_thumbnail_build_time (gint64 _time);
+GDataMediaThumbnail *gdata_media_thumbnail_new (const gchar *uri, guint width, guint height, gint64 _time) G_GNUC_WARN_UNUSED_RESULT;
+gint64 gdata_media_thumbnail_parse_time (const gchar *time_string) G_GNUC_PURE;
+gchar *gdata_media_thumbnail_build_time (gint64 _time) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_media_thumbnail_free (GDataMediaThumbnail *self);
 
 G_END_DECLS
diff --git a/gdata/gdata-private.h b/gdata/gdata-private.h
index 18624e5..41d7fcb 100644
--- a/gdata/gdata-private.h
+++ b/gdata/gdata-private.h
@@ -38,16 +38,17 @@ void _gdata_query_set_previous_uri (GDataQuery *self, const gchar *previous_uri)
 
 #include "gdata-feed.h"
 GDataFeed *_gdata_feed_new_from_xml (const gchar *xml, gint length, GType entry_type,
-				     GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error);
+				     GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error) G_GNUC_WARN_UNUSED_RESULT;
 
 #include "gdata-entry.h"
-GDataEntry *_gdata_entry_new_from_xml (GType entry_type, const gchar *xml, gint length, GError **error);
-GDataEntry *_gdata_entry_new_from_xml_node (GType entry_type, xmlDoc *doc, xmlNode *node, GError **error);
+GDataEntry *_gdata_entry_new_from_xml (GType entry_type, const gchar *xml, gint length, GError **error) G_GNUC_WARN_UNUSED_RESULT;
+GDataEntry *_gdata_entry_new_from_xml_node (GType entry_type, xmlDoc *doc, xmlNode *node, GError **error) G_GNUC_WARN_UNUSED_RESULT;
 
 #include "gdata-parser.h"
 gboolean gdata_parser_error_required_content_missing (const gchar *element_name, GError **error);
 gboolean gdata_parser_error_not_iso8601_format (const gchar *element_name, const gchar *parent_element_name, const gchar *actual_value, GError **error);
-gboolean gdata_parser_error_unhandled_element (const gchar *element_namespace, const gchar *element_name, const gchar *parent_element_name, GError **error);
+gboolean gdata_parser_error_unhandled_element (const gchar *element_namespace, const gchar *element_name,
+					       const gchar *parent_element_name, GError **error);
 gboolean gdata_parser_error_unknown_property_value (const gchar *element_name, const gchar *property_name, const gchar *actual_value, GError **error);
 gboolean gdata_parser_error_required_property_missing (const gchar *element_name, const gchar *property_name, GError **error);
 gboolean gdata_parser_error_required_element_missing (const gchar *element_name, const gchar *parent_element_name, GError **error);
diff --git a/gdata/gdata-query.h b/gdata/gdata-query.h
index 4f70dcb..99638c0 100644
--- a/gdata/gdata-query.h
+++ b/gdata/gdata-query.h
@@ -56,11 +56,11 @@ typedef struct {
 
 GType gdata_query_get_type (void) G_GNUC_CONST;
 
-GDataQuery *gdata_query_new (const gchar *q);
-GDataQuery *gdata_query_new_with_limits (const gchar *q, gint start_index, gint max_results);
-GDataQuery *gdata_query_new_for_id (const gchar *entry_id);
+GDataQuery *gdata_query_new (const gchar *q) G_GNUC_WARN_UNUSED_RESULT;
+GDataQuery *gdata_query_new_with_limits (const gchar *q, gint start_index, gint max_results) G_GNUC_WARN_UNUSED_RESULT;
+GDataQuery *gdata_query_new_for_id (const gchar *entry_id) G_GNUC_WARN_UNUSED_RESULT;
 
-gchar *gdata_query_get_query_uri (GDataQuery *self, const gchar *feed_uri);
+gchar *gdata_query_get_query_uri (GDataQuery *self, const gchar *feed_uri) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_query_next_page (GDataQuery *self);
 gboolean gdata_query_previous_page (GDataQuery *self);
 
diff --git a/gdata/gdata-service.h b/gdata/gdata-service.h
index 1fc0835..b6cb2df 100644
--- a/gdata/gdata-service.h
+++ b/gdata/gdata-service.h
@@ -156,17 +156,18 @@ gboolean gdata_service_authenticate_finish (GDataService *self, GAsyncResult *as
 
 GDataFeed *gdata_service_query (GDataService *self, const gchar *feed_uri, GDataQuery *query, GType entry_type,
 				GCancellable *cancellable,
-				GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error);
+				GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_service_query_async (GDataService *self, const gchar *feed_uri, GDataQuery *query, GType entry_type,
 				GCancellable *cancellable,
 				GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
 				GAsyncReadyCallback callback, gpointer user_data);
-GDataFeed *gdata_service_query_finish (GDataService *self, GAsyncResult *async_result, GError **error);
+GDataFeed *gdata_service_query_finish (GDataService *self, GAsyncResult *async_result, GError **error) G_GNUC_WARN_UNUSED_RESULT;
 
-GDataEntry *gdata_service_insert_entry (GDataService *self, const gchar *upload_uri, GDataEntry *entry, GCancellable *cancellable, GError **error);
+GDataEntry *gdata_service_insert_entry (GDataService *self, const gchar *upload_uri, GDataEntry *entry,
+					GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT;
 /* TODO: async version */
 
-GDataEntry *gdata_service_update_entry (GDataService *self, GDataEntry *entry, GCancellable *cancellable, GError **error);
+GDataEntry *gdata_service_update_entry (GDataService *self, GDataEntry *entry, GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT;
 /* TODO: async version */
 
 gboolean gdata_service_delete_entry (GDataService *self, GDataEntry *entry, GCancellable *cancellable, GError **error);
diff --git a/gdata/services/calendar/gdata-calendar-calendar.h b/gdata/services/calendar/gdata-calendar-calendar.h
index baf4aa5..abbe635 100644
--- a/gdata/services/calendar/gdata-calendar-calendar.h
+++ b/gdata/services/calendar/gdata-calendar-calendar.h
@@ -49,8 +49,8 @@ typedef struct {
 
 GType gdata_calendar_calendar_get_type (void) G_GNUC_CONST;
 
-GDataCalendarCalendar *gdata_calendar_calendar_new (const gchar *id);
-GDataCalendarCalendar *gdata_calendar_calendar_new_from_xml (const gchar *xml, gint length, GError **error);
+GDataCalendarCalendar *gdata_calendar_calendar_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT;
+GDataCalendarCalendar *gdata_calendar_calendar_new_from_xml (const gchar *xml, gint length, GError **error) G_GNUC_WARN_UNUSED_RESULT;
 
 const gchar *gdata_calendar_calendar_get_timezone (GDataCalendarCalendar *self);
 void gdata_calendar_calendar_set_timezone (GDataCalendarCalendar *self, const gchar *_timezone);
diff --git a/gdata/services/calendar/gdata-calendar-event.h b/gdata/services/calendar/gdata-calendar-event.h
index b5053dc..1f00183 100644
--- a/gdata/services/calendar/gdata-calendar-event.h
+++ b/gdata/services/calendar/gdata-calendar-event.h
@@ -49,8 +49,8 @@ typedef struct {
 
 GType gdata_calendar_event_get_type (void) G_GNUC_CONST;
 
-GDataCalendarEvent *gdata_calendar_event_new (const gchar *id);
-GDataCalendarEvent *gdata_calendar_event_new_from_xml (const gchar *xml, gint length, GError **error);
+GDataCalendarEvent *gdata_calendar_event_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT;
+GDataCalendarEvent *gdata_calendar_event_new_from_xml (const gchar *xml, gint length, GError **error) G_GNUC_WARN_UNUSED_RESULT;
 
 void gdata_calendar_event_get_edited (GDataCalendarEvent *self, GTimeVal *edited);
 void gdata_calendar_event_set_edited (GDataCalendarEvent *self, GTimeVal *edited);
diff --git a/gdata/services/calendar/gdata-calendar-query.h b/gdata/services/calendar/gdata-calendar-query.h
index 148dcc0..102cccf 100644
--- a/gdata/services/calendar/gdata-calendar-query.h
+++ b/gdata/services/calendar/gdata-calendar-query.h
@@ -48,8 +48,8 @@ typedef struct {
 
 GType gdata_calendar_query_get_type (void) G_GNUC_CONST;
 
-GDataCalendarQuery *gdata_calendar_query_new (const gchar *q);
-GDataCalendarQuery *gdata_calendar_query_new_with_limits (const gchar *q, GTimeVal *start_min, GTimeVal *start_max);
+GDataCalendarQuery *gdata_calendar_query_new (const gchar *q) G_GNUC_WARN_UNUSED_RESULT;
+GDataCalendarQuery *gdata_calendar_query_new_with_limits (const gchar *q, GTimeVal *start_min, GTimeVal *start_max) G_GNUC_WARN_UNUSED_RESULT;
 
 gboolean gdata_calendar_query_get_future_events (GDataCalendarQuery *self);
 void gdata_calendar_query_set_future_events (GDataCalendarQuery *self, gboolean future_events);
diff --git a/gdata/services/calendar/gdata-calendar-service.h b/gdata/services/calendar/gdata-calendar-service.h
index b898bc0..263013d 100644
--- a/gdata/services/calendar/gdata-calendar-service.h
+++ b/gdata/services/calendar/gdata-calendar-service.h
@@ -47,30 +47,32 @@ typedef struct {
 
 GType gdata_calendar_service_get_type (void) G_GNUC_CONST;
 
-GDataCalendarService *gdata_calendar_service_new (const gchar *client_id);
+GDataCalendarService *gdata_calendar_service_new (const gchar *client_id) G_GNUC_WARN_UNUSED_RESULT;
 
 #include <gdata/services/calendar/gdata-calendar-query.h>
 
 GDataFeed *gdata_calendar_service_query_all_calendars (GDataCalendarService *self, GDataCalendarQuery *query, GCancellable *cancellable,
-						       GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error);
+						       GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+						       GError **error) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_calendar_service_query_all_calendars_async (GDataCalendarService *self, GDataCalendarQuery *query, GCancellable *cancellable,
 						       GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
 						       GAsyncReadyCallback callback, gpointer user_data);
 
 GDataFeed *gdata_calendar_service_query_own_calendars (GDataCalendarService *self, GDataCalendarQuery *query, GCancellable *cancellable,
-						       GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error);
+						       GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+						       GError **error) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_calendar_service_query_own_calendars_async (GDataCalendarService *self, GDataCalendarQuery *query, GCancellable *cancellable,
 						       GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
 						       GAsyncReadyCallback callback, gpointer user_data);
 
 GDataFeed *gdata_calendar_service_query_events (GDataCalendarService *self, GDataCalendarCalendar *calendar, GDataCalendarQuery *query,
 						GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
-						GError **error);
+						GError **error) G_GNUC_WARN_UNUSED_RESULT;
 
 #include <gdata/services/calendar/gdata-calendar-event.h>
 
 GDataCalendarEvent *gdata_calendar_service_insert_event (GDataCalendarService *self, GDataCalendarEvent *event,
-							 GCancellable *cancellable, GError **error);
+							 GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT;
 
 G_END_DECLS
 
diff --git a/gdata/services/contacts/gdata-contacts-contact.h b/gdata/services/contacts/gdata-contacts-contact.h
index bf90289..da39812 100644
--- a/gdata/services/contacts/gdata-contacts-contact.h
+++ b/gdata/services/contacts/gdata-contacts-contact.h
@@ -59,8 +59,8 @@ typedef struct {
 
 GType gdata_contacts_contact_get_type (void) G_GNUC_CONST;
 
-GDataContactsContact *gdata_contacts_contact_new (const gchar *id);
-GDataContactsContact *gdata_contacts_contact_new_from_xml (const gchar *xml, gint length, GError **error);
+GDataContactsContact *gdata_contacts_contact_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT;
+GDataContactsContact *gdata_contacts_contact_new_from_xml (const gchar *xml, gint length, GError **error) G_GNUC_WARN_UNUSED_RESULT;
 
 void gdata_contacts_contact_get_edited (GDataContactsContact *self, GTimeVal *edited);
 void gdata_contacts_contact_add_email_address (GDataContactsContact *self, GDataGDEmailAddress *email_address);
@@ -83,7 +83,7 @@ gboolean gdata_contacts_contact_set_extended_property (GDataContactsContact *sel
 void gdata_contacts_contact_add_group (GDataContactsContact *self, const gchar *href);
 void gdata_contacts_contact_remove_group (GDataContactsContact *self, const gchar *href);
 gboolean gdata_contacts_contact_is_group_deleted (GDataContactsContact *self, const gchar *href);
-GList *gdata_contacts_contact_get_groups (GDataContactsContact *self);
+GList *gdata_contacts_contact_get_groups (GDataContactsContact *self) G_GNUC_WARN_UNUSED_RESULT;
 gboolean gdata_contacts_contact_is_deleted (GDataContactsContact *self);
 
 G_END_DECLS
diff --git a/gdata/services/contacts/gdata-contacts-query.h b/gdata/services/contacts/gdata-contacts-query.h
index b79b104..0041983 100644
--- a/gdata/services/contacts/gdata-contacts-query.h
+++ b/gdata/services/contacts/gdata-contacts-query.h
@@ -58,8 +58,8 @@ typedef struct {
 
 GType gdata_contacts_query_get_type (void) G_GNUC_CONST;
 
-GDataContactsQuery *gdata_contacts_query_new (const gchar *q);
-GDataContactsQuery *gdata_contacts_query_new_with_limits (const gchar *q, gint start_index, gint max_results);
+GDataContactsQuery *gdata_contacts_query_new (const gchar *q) G_GNUC_WARN_UNUSED_RESULT;
+GDataContactsQuery *gdata_contacts_query_new_with_limits (const gchar *q, gint start_index, gint max_results) G_GNUC_WARN_UNUSED_RESULT;
 
 const gchar *gdata_contacts_query_get_order_by (GDataContactsQuery *self);
 void gdata_contacts_query_set_order_by (GDataContactsQuery *self, const gchar *order_by);
diff --git a/gdata/services/contacts/gdata-contacts-service.h b/gdata/services/contacts/gdata-contacts-service.h
index 184c162..e64596e 100644
--- a/gdata/services/contacts/gdata-contacts-service.h
+++ b/gdata/services/contacts/gdata-contacts-service.h
@@ -62,12 +62,14 @@ GType gdata_contacts_service_get_type (void) G_GNUC_CONST;
 GDataContactsService *gdata_contacts_service_new (const gchar *client_id);
 
 GDataFeed *gdata_contacts_service_query_contacts (GDataContactsService *self, GDataContactsQuery *query, GCancellable *cancellable,
-						  GDataQueryProgressCallback progress_callback, gpointer progress_user_data, GError **error);
+						  GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
+						  GError **error) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_contacts_service_query_contacts_async (GDataContactsService *self, GDataContactsQuery *query, GCancellable *cancellable,
 						  GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
 						  GAsyncReadyCallback callback, gpointer user_data);
+
 GDataContactsContact *gdata_contacts_service_insert_contact (GDataContactsService *self, GDataContactsContact *contact,
-							     GCancellable *cancellable, GError **error);
+							     GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT;
 
 G_END_DECLS
 
diff --git a/gdata/services/youtube/gdata-youtube-service.h b/gdata/services/youtube/gdata-youtube-service.h
index 390dc0a..e29bc64 100644
--- a/gdata/services/youtube/gdata-youtube-service.h
+++ b/gdata/services/youtube/gdata-youtube-service.h
@@ -105,12 +105,12 @@ typedef struct {
 GType gdata_youtube_service_get_type (void) G_GNUC_CONST;
 GQuark gdata_youtube_service_error_quark (void) G_GNUC_CONST;
 
-GDataYouTubeService *gdata_youtube_service_new (const gchar *developer_key, const gchar *client_id);
+GDataYouTubeService *gdata_youtube_service_new (const gchar *developer_key, const gchar *client_id) G_GNUC_WARN_UNUSED_RESULT;
 
 GDataFeed *gdata_youtube_service_query_standard_feed (GDataYouTubeService *self, GDataYouTubeStandardFeedType feed_type, GDataQuery *query,
 						      GCancellable *cancellable,
 						      GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
-						      GError **error);
+						      GError **error) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_youtube_service_query_standard_feed_async (GDataYouTubeService *self, GDataYouTubeStandardFeedType feed_type, GDataQuery *query,
 						      GCancellable *cancellable,
 						      GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
@@ -118,20 +118,20 @@ void gdata_youtube_service_query_standard_feed_async (GDataYouTubeService *self,
 
 GDataFeed *gdata_youtube_service_query_videos (GDataYouTubeService *self, GDataQuery *query,
 					       GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
-					       GError **error);
+					       GError **error) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_youtube_service_query_videos_async (GDataYouTubeService *self, GDataQuery *query,
 					       GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
 					       GAsyncReadyCallback callback, gpointer user_data);
 
 GDataFeed *gdata_youtube_service_query_related (GDataYouTubeService *self, GDataYouTubeVideo *video, GDataQuery *query,
 						GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
-						GError **error);
+						GError **error) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_youtube_service_query_related_async (GDataYouTubeService *self, GDataYouTubeVideo *video, GDataQuery *query,
 						GCancellable *cancellable, GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
 						GAsyncReadyCallback callback, gpointer user_data);
 
 GDataYouTubeVideo *gdata_youtube_service_upload_video (GDataYouTubeService *self, GDataYouTubeVideo *video, GFile *video_file,
-						       GCancellable *cancellable, GError **error);
+						       GCancellable *cancellable, GError **error) G_GNUC_WARN_UNUSED_RESULT;
 
 const gchar *gdata_youtube_service_get_developer_key (GDataYouTubeService *self);
 const gchar *gdata_youtube_service_get_youtube_user (GDataYouTubeService *self);
diff --git a/gdata/services/youtube/gdata-youtube-video.h b/gdata/services/youtube/gdata-youtube-video.h
index 912b474..3cc0991 100644
--- a/gdata/services/youtube/gdata-youtube-video.h
+++ b/gdata/services/youtube/gdata-youtube-video.h
@@ -61,8 +61,8 @@ typedef struct {
 
 GType gdata_youtube_video_get_type (void) G_GNUC_CONST;
 
-GDataYouTubeVideo *gdata_youtube_video_new (const gchar *id);
-GDataYouTubeVideo *gdata_youtube_video_new_from_xml (const gchar *xml, gint length, GError **error);
+GDataYouTubeVideo *gdata_youtube_video_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT;
+GDataYouTubeVideo *gdata_youtube_video_new_from_xml (const gchar *xml, gint length, GError **error) G_GNUC_WARN_UNUSED_RESULT;
 
 guint gdata_youtube_video_get_view_count (GDataYouTubeVideo *self);
 guint gdata_youtube_video_get_favorite_count (GDataYouTubeVideo *self);
diff --git a/gdata/services/youtube/gdata-youtube.h b/gdata/services/youtube/gdata-youtube.h
index 43c7749..ecd74f2 100644
--- a/gdata/services/youtube/gdata-youtube.h
+++ b/gdata/services/youtube/gdata-youtube.h
@@ -31,7 +31,8 @@ typedef struct {
 	gchar *message;
 } GDataYouTubeState;
 
-GDataYouTubeState *gdata_youtube_state_new (const gchar *name, const gchar *message, const gchar *reason_code, const gchar *help_uri);
+GDataYouTubeState *gdata_youtube_state_new (const gchar *name, const gchar *message, const gchar *reason_code,
+					    const gchar *help_uri) G_GNUC_WARN_UNUSED_RESULT;
 void gdata_youtube_state_free (GDataYouTubeState *self);
 
 G_END_DECLS



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