monome / norns

norns is many sound instruments.
http://monome.org
GNU General Public License v3.0
630 stars 145 forks source link

battery.c error: 'present' may be used uninitialized in this function [-Werror=maybe-uninitialized] #162

Closed simonvanderveldt closed 6 years ago

simonvanderveldt commented 6 years ago

From Slack, when compiling norns with -Wall -Wextra -Werror we get the following error:

../matron/src/hardware/battery.c: In function 'battery_check':
../matron/src/hardware/battery.c:71:11: error: 'present' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         if(n != present) {
           ^
../matron/src/hardware/battery.c:60:11: error: 'percent' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         if(n != percent) {
           ^
cc1: all warnings being treated as errors
tehn commented 6 years ago

https://github.com/catfact/norns/pull/164