summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-01-13 23:55:02 +0100
committerPablo Barciela <[email protected]>2018-01-14 22:17:29 +0100
commita9b1c7c0a8a3c40909eec7e4f114715ee7496dfa (patch)
tree67e252485f7f0efedc5b2f21bbf9655e52a705e2
parent7b42bfe840a26f940c6b3538f67e420b8f4300f5 (diff)
downloadmate-sensors-applet-a9b1c7c0a8a3c40909eec7e4f114715ee7496dfa.tar.bz2
mate-sensors-applet-a9b1c7c0a8a3c40909eec7e4f114715ee7496dfa.tar.xz
active-sensor.c: Fix build warning:
Fixes the build warning: active-sensor.c: In function ‘active_sensor_new’: active-sensor.c:425:44: warning: iteration 2 invokes undefined behavior [-Waggressive-loop-optimizations] active_sensor->alarm_timeout_id[i] = -1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ active-sensor.c:424:5: note: within this loop for (i = 0; i < NUM_NOTIFS; i++) { ^~~
-rw-r--r--sensors-applet/active-sensor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sensors-applet/active-sensor.c b/sensors-applet/active-sensor.c
index cf53dd2..5ffb262 100644
--- a/sensors-applet/active-sensor.c
+++ b/sensors-applet/active-sensor.c
@@ -421,7 +421,7 @@ ActiveSensor *active_sensor_new(SensorsApplet *sensors_applet,
active_sensor->sensor_row = sensor_row;
int i;
- for (i = 0; i < NUM_NOTIFS; i++) {
+ for (i = 0; i < NUM_ALARMS; i++) {
active_sensor->alarm_timeout_id[i] = -1;
}