summaryrefslogtreecommitdiff
path: root/mate-session
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-12-13 17:49:29 +0300
committerMonsta <[email protected]>2015-12-13 17:49:29 +0300
commitfadc21892499633949f06c19094fb46f41eba695 (patch)
tree5c24882e37ab8fe786cf6e499b614985e84cf83c /mate-session
parent6b09840cadebe81b1baf7dc13cb67346071f53a2 (diff)
downloadmate-session-manager-fadc21892499633949f06c19094fb46f41eba695.tar.bz2
mate-session-manager-fadc21892499633949f06c19094fb46f41eba695.tar.xz
fix warnings about unused variables
Diffstat (limited to 'mate-session')
-rw-r--r--mate-session/gsm-manager.c24
1 files changed, 6 insertions, 18 deletions
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);