[gnome-desktop] idle-monitor: XSyncValue related compile-time warnings



commit 16b0cea1300e78dd9cf5d195bd33607cd1c537e6
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Nov 12 17:58:05 2012 +0100

    idle-monitor: XSyncValue related compile-time warnings
    
    Avoid aggregate return warnings by transforming the _int64_to_xsyncvalue
    function into a macro.
    
    gnome-idle-monitor.c: In function '_int64_to_xsyncvalue':
    gnome-idle-monitor.c:80:1: warning: function returns an aggregate [-Waggregate-return]
    gnome-idle-monitor.c: In function '_xsync_alarm_set':
    gnome-idle-monitor.c:115:26: warning: function call has aggregate value [-Waggregate-return]
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688189

 libgnome-desktop/gnome-idle-monitor.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/libgnome-desktop/gnome-idle-monitor.c b/libgnome-desktop/gnome-idle-monitor.c
index c42c770..77b5432 100644
--- a/libgnome-desktop/gnome-idle-monitor.c
+++ b/libgnome-desktop/gnome-idle-monitor.c
@@ -76,15 +76,7 @@ _xsyncvalue_to_int64 (XSyncValue value)
 		| (guint64) XSyncValueLow32 (value);
 }
 
-static XSyncValue
-_int64_to_xsyncvalue (gint64 value)
-{
-	XSyncValue ret;
-
-	XSyncIntsToValue (&ret, value, ((guint64)value) >> 32);
-
-	return ret;
-}
+#define GINT64_TO_XSYNCVALUE(value, ret) XSyncIntsToValue (ret, value, ((guint64)value) >> 32)
 
 static gboolean
 _find_alarm (gpointer		    key,
@@ -112,7 +104,7 @@ _xsync_alarm_set (GnomeIdleMonitor	*monitor,
 	attr.delta = delta;
 	attr.events = TRUE;
 
-	attr.trigger.wait_value = _int64_to_xsyncvalue (interval);
+	GINT64_TO_XSYNCVALUE (interval, &attr.trigger.wait_value);
 	attr.trigger.test_type = test_type;
 	return XSyncCreateAlarm (monitor->priv->display, flags, &attr);
 }



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