mirror of
https://github.com/Z3Prover/z3
synced 2026-06-30 20:38:56 +00:00
Fix clang warnings about casting away const. (#9933)
This is another PR towards the goal of getting Z3 to compile cleanly when included via FetchContents into clang-tidy, which uses a pretty strict set of warnings. This PR adds ``` "-Wcast-qual" ``` to the set of warnings enabled in the build. This gives warnings like: ``` /Users/daviddetlefs/z3/src/ast/ast.cpp:2897:38: warning: cast from 'app *const *' to 'expr **' drops const qualifier [-Wcast-qual] ``` I fixed these by inserting consts. In some cases, a "const_cast<T>(...)" was necessary.
This commit is contained in:
parent
cd2915ff3c
commit
0adbcaf0d5
4 changed files with 14 additions and 13 deletions
|
|
@ -24,6 +24,7 @@ set(CLANG_ONLY_WARNINGS
|
|||
"-Wsuggest-override"
|
||||
"-Winconsistent-missing-override"
|
||||
"-Wno-missing-field-initializers"
|
||||
"-Wcast-qual"
|
||||
)
|
||||
set(MSVC_WARNINGS "/W3")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue