Disable Wshadow warnings

[ci skip]
This commit is contained in:
Daniel Marjamäki 2018-11-23 22:34:10 +01:00
parent 336e174458
commit 1048aa8ead
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ env:
global:
# unfortunately we need this to stay within 50min timelimit given by travis.
# this also turns off the debug/warning cxxflags
- ORIGINAL_CXXFLAGS="-pedantic -Wall -Wextra -Wabi -Wcast-qual -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wshadow -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -Wno-multichar -D_GLIBCXX_DEBUG -g "
- ORIGINAL_CXXFLAGS="-pedantic -Wall -Wextra -Wabi -Wcast-qual -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wno-shadow -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -Wno-multichar -D_GLIBCXX_DEBUG -g "
- CXXFLAGS="${ORIGINAL_CXXFLAGS} -O2 -march=native -Wstrict-aliasing=2 -Werror=strict-aliasing"
- CPPCHECK=${TRAVIS_BUILD_DIR}/cppcheck
matrix:

View File

@ -52,7 +52,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Woverloaded-virtual") # when a function declaration hides virtual functions from a base class
set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wpacked") #
set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wredundant-decls") # if anything is declared more than once in the same scope
set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wshadow") # whenever a local variable or type declaration shadows another one
set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wno-shadow") # whenever a local variable or type declaration shadows another one
set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wsign-promo") #
set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wno-missing-field-initializers")
set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wno-missing-braces")