Fixed warning "maybe uninitialized" (issue #909)

This commit is contained in:
Benoit Blanchon committed 2019-02-28 13:45:56 +01:00
1 parent f483b06735
commit 5c297ba4a2
3 files changed
+9

No files matched your search

+6
View File
@@ -46,6 +46,12 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6)
add_compile_options(-Wnoexcept)
endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.7 AND
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
# avoid false positive with GCC 4.7
add_compile_options(-Wno-maybe-uninitialized)
endif()
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")