[gnome-screensaver] Fix two compiler warnings



commit c755401cfc32fb9c00c1dce73eb5fbf0fc49e6bc
Author: William Jon McCann <jmccann redhat com>
Date:   Thu Aug 20 23:10:37 2009 -0400

    Fix two compiler warnings
    
    Fixes http://bugzilla.gnome.org/show_bug.cgi?id=589728
    Patch from oku ns dream com

 src/gnome-screensaver-command.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-screensaver-command.c b/src/gnome-screensaver-command.c
index 23bb275..c10ddf8 100644
--- a/src/gnome-screensaver-command.c
+++ b/src/gnome-screensaver-command.c
@@ -231,6 +231,10 @@ get_string_from_iter (DBusMessageIter *iter,
         int    count;
         char **buffer;
 
+        if (num_elements != NULL) {
+                *num_elements = 0;
+        }
+
         count = 0;
         buffer = (char **)malloc (sizeof (char *) * 8);
 
@@ -327,7 +331,7 @@ do_command (DBusConnection *connection)
                         g_print (_("The screensaver is being inhibited by:\n"));
                         inhibitors = get_string_from_iter (&array, &num);
                         for (i = 0; i < num; i++) {
-                                g_printf ("\t%s\n", inhibitors[i]);
+                                g_print ("\t%s\n", inhibitors[i]);
                         }
                         g_strfreev (inhibitors);
                 }



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