diff options
author | Colomban Wendling <[email protected]> | 2023-11-15 15:10:11 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2024-02-04 18:37:58 +0100 |
commit | 62fabfc793b545250dafaf37f75650cbfdce095f (patch) | |
tree | 813bd86b3926f24be1f17a1830f2f3d65fd4ec8a /applets/notification_area/status-notifier | |
parent | f98be9734446e1b620312b69dc8fa8ed0f0997d9 (diff) | |
download | mate-panel-62fabfc793b545250dafaf37f75650cbfdce095f.tar.bz2 mate-panel-62fabfc793b545250dafaf37f75650cbfdce095f.tar.xz |
Reduce scope of variables
Mostly found by cppcheck.
origin commit was:
https://github.com/mate-desktop/mate-panel/commit/96c7ebc
Diffstat (limited to 'applets/notification_area/status-notifier')
-rw-r--r-- | applets/notification_area/status-notifier/sn-host-v0.c | 3 | ||||
-rw-r--r-- | applets/notification_area/status-notifier/sn-item-v0.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/applets/notification_area/status-notifier/sn-host-v0.c b/applets/notification_area/status-notifier/sn-host-v0.c index 64da5da9..4ad6b359 100644 --- a/applets/notification_area/status-notifier/sn-host-v0.c +++ b/applets/notification_area/status-notifier/sn-host-v0.c @@ -193,7 +193,6 @@ register_host_cb (GObject *source_object, GError *error; SnHostV0 *v0; gchar **items; - gint i; error = NULL; sn_watcher_v0_gen_call_register_host_finish (SN_WATCHER_V0_GEN (source_object), @@ -224,7 +223,7 @@ register_host_cb (GObject *source_object, items = sn_watcher_v0_gen_dup_registered_items (v0->watcher); if (items) { - for (i = 0; items[i] != NULL; i++) + for (gint i = 0; items[i] != NULL; i++) add_registered_item (v0, items[i]); } diff --git a/applets/notification_area/status-notifier/sn-item-v0.c b/applets/notification_area/status-notifier/sn-item-v0.c index fd963c31..9deab9d3 100644 --- a/applets/notification_area/status-notifier/sn-item-v0.c +++ b/applets/notification_area/status-notifier/sn-item-v0.c @@ -244,7 +244,6 @@ update (SnItemV0 *v0) GtkImage *image; SnTooltip *tip; gint icon_size; - gboolean visible; const gchar *icon_name; SnIconPixmap **icon_pixmap; @@ -362,7 +361,7 @@ update (SnItemV0 *v0) /* TODO: hide "Passive" items with a setting? */ /*Special case mate-polkit*/ if (g_strcmp0 (v0->status, "password-dialog") != 0){ - visible = g_strcmp0 (v0->status, "Passive") != 0; + gboolean visible = g_strcmp0 (v0->status, "Passive") != 0; gtk_widget_set_visible (GTK_WIDGET (v0), visible); } else |