TTimo / GtkRadiant

The open source, cross platform level editor for idtech games
http://icculus.org/gtkradiant/
Other
582 stars 152 forks source link

Q3data: Fix warning variable psets is used uninitialized #553

Closed Pan7 closed 6 years ago

Pan7 commented 6 years ago

tools/quake3/q3data/polyset.c:87:7: warning: variable 'psets' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if ( strstr( file, ".3DS" ) || strstr( file, ".3ds" ) ) { ^~~~~~~~~~~~ tools/quake3/q3data/polyset.c:112:34: note: uninitialized use occurs here finalpsets = Polyset_SplitSets( psets, numpolysets, numpolysets, maxTrisPerSet ); ^~~~~ tools/quake3/q3data/polyset.c:87:2: note: remove the 'if' if its condition is always true if ( strstr( file, ".3DS" ) || strstr( file, ".3ds" ) ) { ^~~~~~~~~~~~ tools/quake3/q3data/polyset.c:81:18: note: initialize the variable 'psets' to silence this warning polyset_t psets;

See https://github.com/TTimo/GtkRadiant/issues/467