Skip to content

Remove compiler warning suppression, and fix the code #169

@wperkins

Description

@wperkins

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cleanupcmakeInvolving CMake/CTest configuration

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions