summaryrefslogtreecommitdiff
path: root/sensors-applet/sensor-config-dialog.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-12-21 15:39:17 +0100
committerraveit65 <[email protected]>2020-12-28 17:22:27 +0100
commit9bc69fd715b8bb45c0c45a27c71ce2cc49b0c7d3 (patch)
tree09b866afe25a5010e01b5f13b8d353f0d1a27bb0 /sensors-applet/sensor-config-dialog.c
parent80dffdc6078fd319c5f31248f3896b192d773a60 (diff)
downloadmate-sensors-applet-9bc69fd715b8bb45c0c45a27c71ce2cc49b0c7d3.tar.bz2
mate-sensors-applet-9bc69fd715b8bb45c0c45a27c71ce2cc49b0c7d3.tar.xz
Remove cppcheck warnings about the variable scope can be reduced
Diffstat (limited to 'sensors-applet/sensor-config-dialog.c')
-rw-r--r--sensors-applet/sensor-config-dialog.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sensors-applet/sensor-config-dialog.c b/sensors-applet/sensor-config-dialog.c
index 8a49f57..c417fb4 100644
--- a/sensors-applet/sensor-config-dialog.c
+++ b/sensors-applet/sensor-config-dialog.c
@@ -283,13 +283,13 @@ static void sensor_config_dialog_icon_type_changed(GtkComboBox *icon_type_combo_
GtkTreeModel *model;
GtkTreeIter iter;
- GtkTreePath *path;
GdkPixbuf *new_icon;
IconType icon_type;
icons_model = gtk_combo_box_get_model(icon_type_combo_box);
if (gtk_combo_box_get_active_iter(icon_type_combo_box, &icons_iter)) {
+ GtkTreePath *path;
gtk_tree_model_get(icons_model, &icons_iter,
0, &new_icon,
@@ -351,7 +351,6 @@ void sensor_config_dialog_create(SensorsApplet *sensors_applet) {
GtkListStore *icon_store;
IconType count;
- GdkPixbuf *pixbuf;
GdkRGBA graph_color;
gchar *sensor_label;
gchar *header_text;
@@ -452,6 +451,8 @@ void sensor_config_dialog_create(SensorsApplet *sensors_applet) {
/* populate list with icons */
for (count = CPU_ICON; count < NUM_ICONS; count++) {
+ GdkPixbuf *pixbuf;
+
pixbuf = sensors_applet_load_icon(count);
if (pixbuf) {
gtk_list_store_insert(icon_store, &iter, count);