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/
Patch by Aurelien Jarno <aurel32@debian.org>. From http://sources.debian.net/src/wmgtemp/1.1-3/debian/patches/sensors.conf.patch/
From http://fluxcode.net/files/wmgtemp-1.1.tar.gz