瀏覽代碼

CTestCustom: ignore `cm::optional` uninitialized memory false positive

Ben Boeckel 3 年之前
父節點
當前提交
a43713d615
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      CTestCustom.cmake.in

+ 5 - 0
CTestCustom.cmake.in

@@ -83,6 +83,11 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
   "compilation completed with warnings" # PGI
   "[0-9]+ Warning\\(s\\) detected" # SunPro
 
+  # Ignore false positive on `cm::optional` usage from GCC
+  "cmGlobalNinjaGenerator.cxx:[0-9]*:[0-9]*: warning: '.*cm::optional<CxxModuleMapFormat>::_mem\\)\\)' may be used uninitialized \\[-Wmaybe-uninitialized\\]"
+  "cmGlobalNinjaGenerator.cxx:[0-9]*:[0-9]*: note: '.*cm::optional<CxxModuleMapFormat>::_mem\\)\\)' was declared here"
+  "cmGlobalNinjaGenerator.cxx:[0-9]*:[0-9]*: warning: '\\*\\(\\(void\\*\\)& modmap_fmt \\+4\\)' may be used uninitialized in this function \\[-Wmaybe-uninitialized\\]"
+
   # clang-analyzer exceptions
   "cmListFileLexer.c:[0-9]+:[0-9]+: warning: Array subscript is undefined"
   "jsoncpp/src/.*:[0-9]+:[0-9]+: warning: Value stored to .* is never read"