On Wed May 24 17:52:33 2023 +0000, Davide Beatrici wrote:
gcc-9 (Ubuntu 9.4.0-1ubuntu1~18.04) 9.4.0 x86_64-w64-mingw32-gcc (GCC) 9.3-win32 20200422
export CFLAGS_X32="-march=i686 -msse2 -mfpmath=sse -Og -ftree-vectorize" export CFLAGS_X64="-march=x86-64 -msse3 -mfpmath=sse -Og -ftree-vectorize" export LDFLAGS="-Wl,-O1,--sort-common,--as-needed"
That's both old and nonstandard, and while I'm not going to argue too hard against fixing these warnings, it doesn't seem the best use of time. I have to wonder how many other such warnings exist across the codebase with those options...
Anyway, suppressing -Wmaybe-uninitialized by initializing the variable to a dummy value is bad for clarity, and in my experience almost never the right solution. In this case I'd rather replace the for + if pattern (which I pretty much universally dislike) with a helper function.