diff options
author | rbuj <[email protected]> | 2020-08-04 13:11:42 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-09-07 09:11:05 +0200 |
commit | 8f8b7316cc7504a4618705c562ead1ae65dabbdc (patch) | |
tree | c536e6c8079781851f2456528042e19497ee5315 /mate-panel/libpanel-util | |
parent | 59da25f28bc2678cc38bc1def53ca1c4dbf9cc0b (diff) | |
download | mate-panel-8f8b7316cc7504a4618705c562ead1ae65dabbdc.tar.bz2 mate-panel-8f8b7316cc7504a4618705c562ead1ae65dabbdc.tar.xz |
Remove variableScope warnings reported by cppcheck
cppcheck --enable=all . 2> err.txt
grep variableScope err.txt
Diffstat (limited to 'mate-panel/libpanel-util')
-rw-r--r-- | mate-panel/libpanel-util/panel-cleanup.c | 3 | ||||
-rw-r--r-- | mate-panel/libpanel-util/panel-keyfile.c | 9 |
2 files changed, 4 insertions, 8 deletions
diff --git a/mate-panel/libpanel-util/panel-cleanup.c b/mate-panel/libpanel-util/panel-cleanup.c index e3c7063b..199a7036 100644 --- a/mate-panel/libpanel-util/panel-cleanup.c +++ b/mate-panel/libpanel-util/panel-cleanup.c @@ -74,7 +74,6 @@ panel_cleanup_unregister (PanelCleanFunc func, gpointer data) { GSList *l, *next; - PanelClean *clean; g_return_if_fail (func != NULL); @@ -86,7 +85,7 @@ panel_cleanup_unregister (PanelCleanFunc func, do { next = l->next; - clean = l->data; + PanelClean *clean = l->data; if (clean->func == func && clean->data == data) { g_slice_free (PanelClean, clean); cleaner = g_slist_delete_link (cleaner, l); diff --git a/mate-panel/libpanel-util/panel-keyfile.c b/mate-panel/libpanel-util/panel-keyfile.c index e7745501..09d387e3 100644 --- a/mate-panel/libpanel-util/panel-keyfile.c +++ b/mate-panel/libpanel-util/panel-keyfile.c @@ -341,18 +341,15 @@ panel_key_file_remove_all_locale_key (GKeyFile *keyfile, void panel_key_file_ensure_C_key (GKeyFile *keyfile, - const char *key) + const char *key) { - char *C_value; - char *buffer; - /* Make sure we set the "C" locale strings to the terms we set here. * This is so that if the user logs into another locale they get their * own description there rather then empty. It is not the C locale * however, but the user created this entry herself so it's OK */ - C_value = panel_key_file_get_string (keyfile, key); + char *C_value = panel_key_file_get_string (keyfile, key); if (C_value == NULL || C_value [0] == '\0') { - buffer = panel_key_file_get_locale_string (keyfile, key); + char *buffer = panel_key_file_get_locale_string (keyfile, key); if (buffer) { panel_key_file_set_string (keyfile, key, buffer); g_free (buffer); |