[gdm] user-switching: Make sure all exit paths have return values



commit d3cd493a2d8e694c291917290553611a9ff3bbe1
Author: Ray Strode <rstrode redhat com>
Date:   Thu Feb 19 10:07:24 2015 -0500

    user-switching: Make sure all exit paths have return values
    
    The openSUSE Build Service raises a flag for
    
    [   55s] I: Program returns random data in a function
    [   55s] E: gdm no-return-in-nonvoid-function gdm-common.c:850
    [   55s] E: gdm no-return-in-nonvoid-function gdm-user-switching.c:597
    
    This can happen when CONSOLEKIT is disabled (As is newly the case) and
    LOGING_RUNNING would return false.
    
    Based on a patch by Dominique Leuenberger
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744787

 common/gdm-common.c         |    2 ++
 libgdm/gdm-user-switching.c |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/common/gdm-common.c b/common/gdm-common.c
index 4017313..effd4bc 100644
--- a/common/gdm-common.c
+++ b/common/gdm-common.c
@@ -846,6 +846,8 @@ gdm_goto_login_session (GError **error)
 
 #ifdef WITH_CONSOLE_KIT
         return goto_login_session_for_ck (connection, error);
+#else
+        return FALSE;
 #endif
 }
 
diff --git a/libgdm/gdm-user-switching.c b/libgdm/gdm-user-switching.c
index ebfef1c..a195d05 100644
--- a/libgdm/gdm-user-switching.c
+++ b/libgdm/gdm-user-switching.c
@@ -593,5 +593,7 @@ gdm_goto_login_session_sync (GCancellable  *cancellable,
 
         g_object_unref (connection);
         return retval;
+#else
+        return FALSE;
 #endif
 }


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