You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ 66s] /home/abuild/rpmbuild/BUILD/cdogs-sdl-2.4.0-build/cdogs-sdl-2.4.0/src/prep.c: In function ‘GameOptionsUpdate’:
[ 66s] /home/abuild/rpmbuild/BUILD/cdogs-sdl-2.4.0-build/cdogs-sdl-2.4.0/src/prep.c:726:33: error: variable ‘j’ set but not used [-Werror=unused-but-set-variable=]
[ 66s] 726 | for (int i = 0, j = 0; i < (int)gData->allowed.size; i++, j++)
[ 66s] | ^
[ 66s] cc1: all warnings being treated as errors
In GCC 16, pre/post increments no longer count as variable uses. If the variable is not used in any other way, it issues a warning, as seen above. If you don't want to deal with GCC 16 yourself, I can test fixes for you.
cdogs-sdl doesn't build with GCC 16 with -Werror:
[ 66s] /home/abuild/rpmbuild/BUILD/cdogs-sdl-2.4.0-build/cdogs-sdl-2.4.0/src/prep.c: In function ‘GameOptionsUpdate’:
[ 66s] /home/abuild/rpmbuild/BUILD/cdogs-sdl-2.4.0-build/cdogs-sdl-2.4.0/src/prep.c:726:33: error: variable ‘j’ set but not used [-Werror=unused-but-set-variable=]
[ 66s] 726 | for (int i = 0, j = 0; i < (int)gData->allowed.size; i++, j++)
[ 66s] | ^
[ 66s] cc1: all warnings being treated as errors
Full build log: https://build.opensuse.org/build/home:rguenther:plgrnd/openSUSE_Factory/x86_64/cdogs-sdl/_log
In GCC 16, pre/post increments no longer count as variable uses. If the variable is not used in any other way, it issues a warning, as seen above. If you don't want to deal with GCC 16 yourself, I can test fixes for you.