summaryrefslogtreecommitdiff
path: root/multiload
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-07-08 21:02:09 +0200
committerraveit65 <[email protected]>2020-07-17 11:43:12 +0200
commit46329dddf49af7a60e04d26c550c5919bbda9909 (patch)
tree21265004a9b04b45a56ae0c7cf638173842b7c34 /multiload
parentb8738dde7048b76f3d2a11e6371a67d5b0383080 (diff)
downloadmate-applets-46329dddf49af7a60e04d26c550c5919bbda9909.tar.bz2
mate-applets-46329dddf49af7a60e04d26c550c5919bbda9909.tar.xz
Remove warning about assigned value is never used reported by cppcheck
Diffstat (limited to 'multiload')
-rw-r--r--multiload/linux-proc.c4
-rw-r--r--multiload/load-graph.c6
2 files changed, 3 insertions, 7 deletions
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);