Fix warnings: -Wextra and -Wshadow compatible
in progress and looks promising
Ready. It has smaller scope than !220 (merged)
Here I am fixing all warnings from flags:
-Wextra
- small part of
-Wshadow
, to be precise only the-Wshadow=compatible-local
This is a lot of changes. So to make sure that everything works, I also have run locally all the working examples.
Then to make sure that this work is not wasted (and since all warnings are fixed) I changed all warnings into errors using flag -Werror
.
However some old versions of other libraries produce some more warnings and some older compilers detect fewer warnings. So I used my chroots to try and find proper warning configuration for all the supported versions. So this MR produces maximally available warnings turned into errors for given compiler version. And warnings produced by external libraries remain warnings only, since we cannot fix them.
Next step would be more of the flags that I mention in !220 (merged). But first let's finish this "small" part here :)