Enabling Warnings for VisIt #19003
JustinPrivitera
started this conversation in
Share cool stuff
Replies: 3 comments 3 replies
-
Beta Was this translation helpful? Give feedback.
3 replies
-
|
Assuming this is fixed (#19001) this process will be much easier. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
You can also use You can start with as few or as many warnings you like, once you change them and run |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This repo has lots of good things: https://github.com/cpp-best-practices/cppbestpractices/tree/master
In particular, https://github.com/cpp-best-practices/cppbestpractices/blob/master/02-Use_the_Tools_Available.md#gcc--clang
has the full list of warnings.
To enable all of these warnings, I added the following to the cmake invocation in
recmake_visit.sh:-DCMAKE_CXX_FLAGS:STRING=" -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wnull-dereference -Wuseless-cast -Wdouble-promotion -Wformat=2 -pedantic -m64 -fPIC" -DCMAKE_C_FLAGS:STRING=" -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wnull-dereference -Wuseless-cast -Wdouble-promotion -Wformat=2 -pedantic -m64 -fPIC"Then I ran
./recmake_visit.sh.If you do this and then build, you will see tens of thousands of warnings, including many from our third party dependencies. If we're just trying to view warnings for one particular file, we can do the following to hide all other warnings:
This should hide almost everything, although macros that depend on other things can still cause warnings to appear for code outside the file you are editing. But this mostly hides everything and makes it manageable.
Beta Was this translation helpful? Give feedback.
All reactions