Open marinier opened 1 year ago
Currently in the process of upgrading the warning levels to -Wall (/W4 on Windows). There are a good thousand warnings there. Starting with the low-hanging fruit, I'll delete the unused variables (~100).
Work is proceeding by adding new warnings one-at-a-time here: https://github.com/SoarGroup/Soar/blob/development/SConstruct#L233. Next goal for Windows is /W2
; gcc unfortunately doesn't have warning levels, but we can see the list enabled for -Wall
here: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wall.
Building with -Wall, outputting everything to out.txt
, and then analyzing for the warnings that are left:
grep -o '\[-W[^]]*\]' out.txt | sort | uniq -c | sort -nr
37 [-Wunused-but-set-variable]
8 [-Wunused-private-field]
4 [-Wuninitialized]
4 [-Wdelete-non-abstract-non-virtual-dtor]
2 [-Wsometimes-uninitialized]
And for -Wextra:
408 [-Wignored-qualifiers]
403 [-Wunused-parameter]
67 [-Wsign-compare]
2 [-Wdeprecated-copy-with-user-provided-copy]
After tackling these, we can set -Werror
on *nix and then tackle Windows warnings.
There are a lot of warnings during the build. Some of them might even be real problems. I imagine they are different on windows vs. linux vs. OS X, too.
Here are the warnings I get when building from Visual Studio 2019's developer command prompt:
Here's the complete output for context: build-output.txt