summaryrefslogtreecommitdiff
path: root/glib
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2010-09-18 16:31:00 -0400
committerRyan Lortie <desrt@desrt.ca>2010-09-18 16:31:00 -0400
commitcec629972b2a599cb28eb9d61cc000c4dc97f534 (patch)
treefb3342bc34e6bef93f11fac9691fcedc8144beaf /glib
parentac05f990db211a27a950d61ef4bf47335ced7cc4 (diff)
downloadglib-cec629972b2a599cb28eb9d61cc000c4dc97f534.tar.gz
GDateTime: G_GNUC_WARN_UNUSED_RESULT for modifiers
Emmanuele suggested adding G_GNUC_WARN_UNUSED_RESULT to all of the g_date_time_add_* functions to help deal with the situation where people may mistakenly believe that these functions are inplace modifiers.
Diffstat (limited to 'glib')
-rw-r--r--glib/gdatetime.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/glib/gdatetime.h b/glib/gdatetime.h
index 8f8533a9b..276a17084 100644
--- a/glib/gdatetime.h
+++ b/glib/gdatetime.h
@@ -131,25 +131,34 @@ GDateTime * g_date_time_new_utc (gint
gint minute,
gdouble seconds);
+G_GNUC_WARN_UNUSED_RESULT
GDateTime * g_date_time_add (GDateTime *datetime,
GTimeSpan timespan);
+G_GNUC_WARN_UNUSED_RESULT
GDateTime * g_date_time_add_years (GDateTime *datetime,
gint years);
+G_GNUC_WARN_UNUSED_RESULT
GDateTime * g_date_time_add_months (GDateTime *datetime,
gint months);
+G_GNUC_WARN_UNUSED_RESULT
GDateTime * g_date_time_add_weeks (GDateTime *datetime,
gint weeks);
+G_GNUC_WARN_UNUSED_RESULT
GDateTime * g_date_time_add_days (GDateTime *datetime,
gint days);
+G_GNUC_WARN_UNUSED_RESULT
GDateTime * g_date_time_add_hours (GDateTime *datetime,
gint hours);
+G_GNUC_WARN_UNUSED_RESULT
GDateTime * g_date_time_add_minutes (GDateTime *datetime,
gint minutes);
+G_GNUC_WARN_UNUSED_RESULT
GDateTime * g_date_time_add_seconds (GDateTime *datetime,
gdouble seconds);
+G_GNUC_WARN_UNUSED_RESULT
GDateTime * g_date_time_add_full (GDateTime *datetime,
gint years,
gint months,