wmgtemp: Fix -Waggressive-loop-optimizations compiler warning.
In particular, the cpu_history array has length 59, so when i = 58, cpu_history[i+1] is undefined. From http://sources.debian.net/src/wmgtemp/1.1-3/debian/patches/fix_-Waggressive-loop-optimizations.patch/
This commit is contained in:
parent
84b7716e3d
commit
bb4dd3f5c6
1 changed files with 1 additions and 1 deletions
|
@ -428,7 +428,7 @@ void update_sensor_data() {
|
||||||
double sys_high = highest_temp(sys_history);
|
double sys_high = highest_temp(sys_history);
|
||||||
|
|
||||||
/* Shift the arrays */
|
/* Shift the arrays */
|
||||||
for(i = 0; i < 59; i++) {
|
for(i = 0; i < 58; i++) {
|
||||||
cpu_history[i] = cpu_history[i + 1];
|
cpu_history[i] = cpu_history[i + 1];
|
||||||
sys_history[i] = sys_history[i + 1];
|
sys_history[i] = sys_history[i + 1];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue