summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-01-13 23:55:02 +0100
committermonsta <[email protected]>2018-03-02 16:43:51 +0300
commitc8997a31b0ff6f6d5b07575f5baf30ccdbfbfe63 (patch)
treee19854fd7729e0e781b2b275ac89763a907d6984
parenta382b9bf86642689b2cc3031e014073460238eaf (diff)
downloadmate-sensors-applet-c8997a31b0ff6f6d5b07575f5baf30ccdbfbfe63.tar.bz2
mate-sensors-applet-c8997a31b0ff6f6d5b07575f5baf30ccdbfbfe63.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 46e8000..7abf236 100644
--- a/sensors-applet/active-sensor.c
+++ b/sensors-applet/active-sensor.c
@@ -428,7 +428,7 @@ ActiveSensor *active_sensor_new(SensorsApplet *sensors_applet,
#endif
int i;
- for (i = 0; i < NUM_NOTIFS; i++) {
+ for (i = 0; i < NUM_ALARMS; i++) {
active_sensor->alarm_timeout_id[i] = -1;
}