monome / norns

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

system_cmd.c waf compile error on pi4 #925

Closed okyeron closed 4 years ago

okyeron commented 4 years ago

https://github.com/monome/norns/blob/e22003b050d27149e4150bc4c53d7b2a0afb7b47/matron/src/system_cmd.c#L91

../matron/src/system_cmd.c: In function ‘run_cmd’:
../matron/src/system_cmd.c:91:5: error: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
     strncpy(cap, capture, len);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~
../matron/src/system_cmd.c:89:18: note: length computed here
     size_t len = strlen(capture);
                  ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Waf: Leaving directory `/home/we/norns/build'
Build failed
 -> task in 'matron' failed with exit status 1 (run with -v to display more information)
okyeron commented 4 years ago

pi4 has gcc 8.3.0

found a stackoverflow reference to similar.

another reference here. Not entirely sure that applies?

perhaps a resurgence of the bug in #710?

catfact commented 4 years ago

most oddly, i can't seem reproduce with gcc 8.3.0 on ubuntu. (with -Wall -Werror -O3 etc)

anyways, i guess PR #926 will do it

okyeron commented 4 years ago

fixed with #926