build: eliminate warnings

This commit is contained in:
Alexander Alekhin 2018-10-17 08:41:18 +00:00
parent 5339ef3004
commit a2e754c136

View File

@ -103,7 +103,9 @@ if(CV_GCC OR CV_CLANG)
add_extra_compiler_option(-Wundef)
add_extra_compiler_option(-Winit-self)
add_extra_compiler_option(-Wpointer-arith)
add_extra_compiler_option(-Wshadow)
if(NOT (CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0"))
add_extra_compiler_option(-Wshadow) # old GCC emits warnings for variables + methods combination
endif()
add_extra_compiler_option(-Wsign-promo)
add_extra_compiler_option(-Wuninitialized)
add_extra_compiler_option(-Winit-self)