As reported in #1485, some environments may activate -Wextra, which uncovers a number of warnings, mainly about unused variables. Apart from that, CRAN is constantly evolving and strengthening the checks, as e.g. we recently learned with -Wconversion in #1488. So we could benefit from a CI setup that enables us to expand the set of flags to detect, and then fix, those warnings.
Package installation only uses a limited part of the codebase, but the tests have a good coverage and should be representative of what client packages experience. Therefore the proposal would be to turn on -Werror, which will make the tests fail if any warning is found, and then start pushing and fixing -Wextra and other variants.
I would do this in just one of the CI jobs. The question is whether a new one, or one of the existing ones.
As reported in #1485, some environments may activate
-Wextra, which uncovers a number of warnings, mainly about unused variables. Apart from that, CRAN is constantly evolving and strengthening the checks, as e.g. we recently learned with-Wconversionin #1488. So we could benefit from a CI setup that enables us to expand the set of flags to detect, and then fix, those warnings.Package installation only uses a limited part of the codebase, but the tests have a good coverage and should be representative of what client packages experience. Therefore the proposal would be to turn on
-Werror, which will make the tests fail if any warning is found, and then start pushing and fixing-Wextraand other variants.I would do this in just one of the CI jobs. The question is whether a new one, or one of the existing ones.