From fadc21892499633949f06c19094fb46f41eba695 Mon Sep 17 00:00:00 2001 From: Monsta Date: Sun, 13 Dec 2015 17:49:29 +0300 Subject: fix warnings about unused variables --- mate-session/gsm-manager.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'mate-session') diff --git a/mate-session/gsm-manager.c b/mate-session/gsm-manager.c index 7930993..a0e1762 100644 --- a/mate-session/gsm-manager.c +++ b/mate-session/gsm-manager.c @@ -1166,11 +1166,6 @@ manager_perhaps_lock (GsmManager *manager) static void manager_attempt_hibernate (GsmManager *manager) { -#ifdef HAVE_UPOWER - gboolean can_hibernate; - GError *error; - gboolean ret; -#endif #ifdef HAVE_SYSTEMD if (LOGIND_RUNNING()) { @@ -1188,14 +1183,13 @@ manager_attempt_hibernate (GsmManager *manager) else { #endif #ifdef HAVE_UPOWER_HIBERNATE_SUSPEND - can_hibernate = up_client_get_can_hibernate (manager->priv->up_client); + gboolean can_hibernate = up_client_get_can_hibernate (manager->priv->up_client); if (can_hibernate) { - /* lock the screen before we suspend */ manager_perhaps_lock (manager); - error = NULL; - ret = up_client_hibernate_sync (manager->priv->up_client, NULL, &error); + GError *error = NULL; + gboolean ret = up_client_hibernate_sync (manager->priv->up_client, NULL, &error); if (!ret) { g_warning ("Unexpected hibernate failure: %s", error->message); @@ -1211,11 +1205,6 @@ manager_attempt_hibernate (GsmManager *manager) static void manager_attempt_suspend (GsmManager *manager) { -#ifdef HAVE_UPOWER - gboolean can_suspend; - GError *error; - gboolean ret; -#endif #ifdef HAVE_SYSTEMD if (LOGIND_RUNNING()) { @@ -1233,14 +1222,13 @@ manager_attempt_suspend (GsmManager *manager) else { #endif #ifdef HAVE_UPOWER_HIBERNATE_SUSPEND - can_suspend = up_client_get_can_suspend (manager->priv->up_client); + gboolean can_suspend = up_client_get_can_suspend (manager->priv->up_client); if (can_suspend) { - /* lock the screen before we suspend */ manager_perhaps_lock (manager); - error = NULL; - ret = up_client_suspend_sync (manager->priv->up_client, NULL, &error); + GError *error = NULL; + gboolean ret = up_client_suspend_sync (manager->priv->up_client, NULL, &error); if (!ret) { g_warning ("Unexpected suspend failure: %s", error->message); -- cgit v1.2.1