Hi people! don’t know if this is the correct category lol
when compiling lastest experimental in Linux i get the following warning:
src/sdltiles.cpp: In function ‘curses_drawwindow’:
src/mapdata.h:254:0: error: ‘connect_group’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
return ( connect_group != TERCONN_NONE ) && ( connect_group == test_connect_group );
^
src/cata_tiles.cpp:2224:9: note: ‘connect_group’ was declared here
int connect_group;
^
lto1: all warnings being treated as errors
connect_group used is actually declared in mapdata.h:248 and yeah… it MAY BE uninitialized.
I could just initialize it to TERCONN_NONE which seems default but wanted some input on it… or some way to disable warnings :P.
Initializing it is the way to go, but it’s strange that it’s not erroring in mainline, we definitely have -Wall -Werror set. I wonder if this is occurring with LTO only, I don’t think we’re using it in official builds.
As for disabling warnings, I believe you can set a variable to inject the appropriate -Wno-whatever-warning flag, but I don’t recall what it is offhand. There’s a big block of comments at the top of the Makefile outlining configuration options.