diff options
author | rbuj <[email protected]> | 2020-07-08 21:02:09 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-07-17 11:43:12 +0200 |
commit | 46329dddf49af7a60e04d26c550c5919bbda9909 (patch) | |
tree | 21265004a9b04b45a56ae0c7cf638173842b7c34 | |
parent | b8738dde7048b76f3d2a11e6371a67d5b0383080 (diff) | |
download | mate-applets-46329dddf49af7a60e04d26c550c5919bbda9909.tar.bz2 mate-applets-46329dddf49af7a60e04d26c550c5919bbda9909.tar.xz |
Remove warning about assigned value is never used reported by cppcheck
-rw-r--r-- | cpufreq/src/cpufreq-selector.c | 2 | ||||
-rw-r--r-- | mateweather/mateweather-dialog.c | 2 | ||||
-rw-r--r-- | multiload/linux-proc.c | 4 | ||||
-rw-r--r-- | multiload/load-graph.c | 6 |
4 files changed, 5 insertions, 9 deletions
diff --git a/cpufreq/src/cpufreq-selector.c b/cpufreq/src/cpufreq-selector.c index 4bdac4df..5d9d4915 100644 --- a/cpufreq/src/cpufreq-selector.c +++ b/cpufreq/src/cpufreq-selector.c @@ -44,9 +44,9 @@ G_DEFINE_TYPE (CPUFreqSelector, cpufreq_selector, G_TYPE_OBJECT) static void cpufreq_selector_finalize (GObject *object) { +#ifdef HAVE_POLKIT CPUFreqSelector *selector = CPUFREQ_SELECTOR (object); -#ifdef HAVE_POLKIT g_clear_object (&selector->proxy); g_clear_object (&selector->system_bus); #endif /* HAVE_POLKIT */ diff --git a/mateweather/mateweather-dialog.c b/mateweather/mateweather-dialog.c index b84f94c8..e8ff29ae 100644 --- a/mateweather/mateweather-dialog.c +++ b/mateweather/mateweather-dialog.c @@ -115,7 +115,7 @@ static void link_cb(GtkButton* button, gpointer data) static gchar* replace_multiple_new_lines(gchar* s) { gchar *prev_s = s; - gint count = 0; + gint count; gint i; if (s == NULL) { diff --git a/multiload/linux-proc.c b/multiload/linux-proc.c index db532b8c..00b35b50 100644 --- a/multiload/linux-proc.c +++ b/multiload/linux-proc.c @@ -416,7 +416,6 @@ GetNet (int Maximum, int data [4], LoadGraph *g) else { int delta[COUNT_TYPES]; - int total = 0; for (i = 0; i < COUNT_TYPES; i++) { @@ -425,11 +424,8 @@ GetNet (int Maximum, int data [4], LoadGraph *g) delta[i] = (present[i] - past[i]); else delta[i] = 0; - total += delta[i]; } - //max = autoscaler_get_max(&scaler, total); - for (i = 0; i < COUNT_TYPES; i++) data[i] = delta[i]; diff --git a/multiload/load-graph.c b/multiload/load-graph.c index 9c2af5f5..6652a6f2 100644 --- a/multiload/load-graph.c +++ b/multiload/load-graph.c @@ -93,7 +93,7 @@ load_graph_draw (LoadGraph *g) { guint maxnet = 1; gint segments = 1; - gint combined = 0; + gint combined; for (i = 0; i < g->draw_width; i++) { g->pos [i] = g->draw_height - 1; @@ -154,7 +154,7 @@ load_graph_draw (LoadGraph *g) /* draw grid lines if needed */ gdk_cairo_set_source_rgba (cr, &(g->colors [4])); - double spacing = 0; + double spacing; for (k = 0; k < segments -1; k++) { spacing = ((double) g->draw_height/segments) * (k+1); @@ -209,7 +209,7 @@ load_graph_draw (LoadGraph *g) /* draw grid lines in Load graph if needed */ gdk_cairo_set_source_rgba (cr, &(g->colors [2])); - double spacing = 0; + double spacing; for (k = 0; k < load - 1; k++) { spacing = ((double) g->draw_height/load) * (k+1); |