Closes: #19017
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.
init.cpp:969:5: warning: loop will run at most once (loop increment never executed) [-Wunreachable-code-loop-increment]
for (const auto& arg : gArgs.GetUnsuitableSectionOnlyArgs()) {
^~~
1 warning generated.
To fix this, collect all errors, and output them in a single error message after the loop completes. This resolves the unreachable code warning, and avoids popup hell that could result from outputting a seperate message for each error or warning one by one.