瀏覽代碼

KWSys 2023-05-22 (df6f93a4)

Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit df6f93a430449816d1d8c112d0743cf30601c5b7 (master).

Upstream Shortlog
-----------------

Brad King (1):
      199aa713 RegularExpression: Tell clang-analyzer that program memory is initialized
KWSys Upstream 2 年之前
父節點
當前提交
068ff58785
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      RegularExpression.cxx

+ 4 - 0
RegularExpression.cxx

@@ -378,6 +378,10 @@ bool RegularExpression::compile(const char* exp)
     return false;
   }
 
+#ifdef __clang_analyzer__ /* Convince it that the program is initialized.  */
+  memset(this->program, 0, comp.regsize);
+#endif
+
   // Second pass: emit code.
   comp.regparse = exp;
   comp.regnpar = 1;