From a9b1c7c0a8a3c40909eec7e4f114715ee7496dfa Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Sat, 13 Jan 2018 23:55:02 +0100 Subject: active-sensor.c: Fix build warning: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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++) { ^~~ --- sensors-applet/active-sensor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sensors-applet') 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; } -- cgit v1.2.1