Correct build warnings on Linux and macOS #775
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enables "warning as errors" in CI runs on Linux and macOS and fixes all found warnings.
Warnings from Botan regarding use of deprecated APIs are disable as a start, but we probably should look into them, or fix so that Botan 3 can be used.
Warnings fixed:
- "this statement may fall through" [implicit-fallthrough]
- "enumeration value ‘Unknown’ not handled in switch" [switch]
- unused variables [unused-const-variable]
- replace sprintf with snprintf due to macOS deprecation [deprecated-declarations]
- unused arguments in tests
- remove unused CppUnit Listeners
- extra fallthrough comment needed after macros in GCC, see issue.
To allow users (or CI) to build using a specific CXXFLAGS on macOS the
ax_cxx_compile_stdcxx_11
macro is upgraded from v4 to v25 (CXXFLAGS issue fixed in v15).From repo described in https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html