repo: Disable gcc 8 stringop warnings
authorLenny Komow <lenny@lunarg.com>
Mon, 22 Oct 2018 22:34:26 +0000 (16:34 -0600)
committerLenny Komow <lenny@lunarg.com>
Mon, 22 Oct 2018 22:34:26 +0000 (16:34 -0600)
GCC 8 introduced some new "stringop" wanrings. The loader deliberately
does things that trigger these warnings. As such, they should be
disabled

Change-Id: I08f640fae2930a06cbdd48095f11febfc9e866ed

CMakeLists.txt

index 167d0c8aa1d3a6194d81a531cef734d5f7f41b47..65044099bab628b1f55bde18852e850cb246379b 100644 (file)
@@ -121,7 +121,7 @@ endif()
 include_directories(${VulkanHeaders_INCLUDE_DIRS})
 
 if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
-    set(COMMON_COMPILE_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
+    set(COMMON_COMPILE_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-stringop-truncation -Wno-stringop-overflow")
     set(COMMON_COMPILE_FLAGS "${COMMON_COMPILE_FLAGS} -fno-strict-aliasing -fno-builtin-memcmp")
 
     # For GCC version 7.1 or greater, we need to disable the implicit fallthrough warning since there's no consistent way to satisfy