Skip to content

Commit

Permalink
removed unnecessary warning suppressions
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Sep 29, 2023
1 parent eb70a58 commit 72182e2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ ifeq (clang++, $(findstring clang++,$(CXX)))
CPPCHK_GLIBCXX_DEBUG=
endif
ifndef CXXFLAGS
CXXFLAGS=-pedantic -Wall -Wextra -Wcast-qual -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wundef -Wno-shadow -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -Wno-multichar -Woverloaded-virtual $(CPPCHK_GLIBCXX_DEBUG) -g
CXXFLAGS=-pedantic -Wall -Wextra -Wcast-qual -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wundef -Wno-sign-compare -Wno-multichar -Woverloaded-virtual $(CPPCHK_GLIBCXX_DEBUG) -g
endif

ifeq (g++, $(findstring g++,$(CXX)))
Expand Down
6 changes: 1 addition & 5 deletions cmake/compileroptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang
add_compile_options(-Wpacked) #
add_compile_options(-Wredundant-decls) # if anything is declared more than once in the same scope
add_compile_options(-Wundef)
add_compile_options(-Wno-missing-field-initializers)
add_compile_options(-Wno-missing-braces)
add_compile_options(-Wno-sign-compare)
add_compile_options(-Wno-multichar)
add_compile_options(-Woverloaded-virtual) # when a function declaration hides virtual functions from a base class
Expand All @@ -57,9 +55,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# use pipes instead of temporary files - greatly reduces I/O usage
add_compile_options(-pipe)

add_compile_options(-Wno-maybe-uninitialized) # there are some false positives
add_compile_options(-Wsuggest-attribute=noreturn)
add_compile_options(-Wno-shadow) # whenever a local variable or type declaration shadows another one
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 14 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 14)
# TODO: verify this regression still exists in clang-15
Expand All @@ -81,7 +77,7 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()

# TODO: fix and enable these warnings - or move to suppression list below
add_compile_options_safe(-Wno-documentation-unknown-command) # TODO: Clang currently does not support all commands
add_compile_options_safe(-Wno-documentation-unknown-command) # TODO: Clang currently does not support all commands
add_compile_options_safe(-Wno-inconsistent-missing-destructor-override) # caused by Qt moc code
add_compile_options_safe(-Wno-unused-exception-parameter)
add_compile_options_safe(-Wno-old-style-cast)
Expand Down
3 changes: 0 additions & 3 deletions tools/dmake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,6 @@ int main(int argc, char **argv)
"-Wpacked "
"-Wredundant-decls "
"-Wundef "
"-Wno-shadow "
"-Wno-missing-field-initializers "
"-Wno-missing-braces "
"-Wno-sign-compare "
"-Wno-multichar "
"-Woverloaded-virtual "
Expand Down

0 comments on commit 72182e2

Please sign in to comment.