Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove compiler warning suppression, and fix the code #169

Open
wperkins opened this issue Oct 11, 2023 · 1 comment
Open

Remove compiler warning suppression, and fix the code #169

wperkins opened this issue Oct 11, 2023 · 1 comment

Comments

@wperkins
Copy link
Member

Prompted by a conversation with @abhyshr ...
In the root CMakeList.txt file, we have this:

# -------------------------------------------------------------
# Compiler specific options
# -------------------------------------------------------------

# FIXME: remove annoying warnings (these warnings probably identify
# real problems, but there are so many of them they obscure errors
# that are causing identifiable problems

if (CMAKE_COMPILER_IS_GNUCXX) 
  add_definitions(
    -pedantic
    -Wno-write-strings
    -Wno-long-long 
    -Wno-sign-compare 
    -Wno-unused-variable
    -Wno-unused-but-set-variable
    -Wno-maybe-uninitialized
    )
endif()

# using regular Clang or AppleClang
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_definitions(
    -Wno-c++11-extensions
    -Wno-c++11-compat-deprecated-writable-strings
    -Wno-format-security
    -DGRIDPACK_AVOID_APPLECLANG_MPI_PROBLEMS=1
    )
endif()

I remember adding several of these suppression options (and the FIXME comment). We should work towards fixing the code that generate the warnings, because they may indicate real problems. I'm not necessarily advocating making all warnings into errors, just cutting the volume. It's going to be a bit of a challenge to eliminate some, like -Wno-write-strings and some generated by boost.

@bjpalmer bjpalmer added this to the GridPACK 3.5 Release milestone Oct 11, 2023
@wperkins
Copy link
Member Author

I think this needs to be postponed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants