[gnome-settings-daemon] usb-protection: Fix unused is_locked variable warning



commit 602211a86769b221ff4deb38f981e6fda456e787
Author: Ludovico de Nittis <ludovico denittis collabora com>
Date:   Sun Mar 1 13:48:18 2020 +0100

    usb-protection: Fix unused is_locked variable warning

 plugins/usb-protection/gsd-usb-protection-manager.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/plugins/usb-protection/gsd-usb-protection-manager.c 
b/plugins/usb-protection/gsd-usb-protection-manager.c
index bdbbf6c7..036caef4 100644
--- a/plugins/usb-protection/gsd-usb-protection-manager.c
+++ b/plugins/usb-protection/gsd-usb-protection-manager.c
@@ -497,16 +497,14 @@ on_screen_locked (GsdScreenSaver          *screen_saver,
                   GAsyncResult            *result,
                   GsdUsbProtectionManager *manager)
 {
-        gboolean is_locked;
         g_autoptr(GError) error = NULL;
 
-        is_locked = gsd_screen_saver_call_lock_finish (screen_saver, result, &error);
+        gsd_screen_saver_call_lock_finish (screen_saver, result, &error);
 
         if (error) {
-            g_warning ("Couldn't lock screen: %s", error->message);
-            if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
-                return;
-            }
+                if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+                        return;
+                g_warning ("Couldn't lock screen: %s", error->message);
         }
 
         show_notification (manager,


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