In #19015 it’s been suggested that we add some new compiler warnings to our build. Some of these, such as -Wunreachable-code-loop-increment
, generate warnings. We’ll likely want to fix these up if we’re going to turn these warnings on.
0init.cpp:969:5: warning: loop will run at most once (loop increment never executed) [-Wunreachable-code-loop-increment]
1 for (const auto& arg : gArgs.GetUnsuitableSectionOnlyArgs()) {
2 ^~~
31 warning generated.
If you want to build master, with -Wunreachable-code-loop-increment
, you can use something like this:
0./autogen.sh
1./configure CXXFLAGS="-Wunreachable-code-loop-increment"
2make check