浏览代码

cmJSONState: Add missing member initializer

In commit 7d2cc6ece6 (presets: Allow comments in presets files,
2024-06-23) we added a member without an initializer.  This causes
dynamic analysis to report use of an uninitialized value.
Brad King 1 年之前
父节点
当前提交
ccd4612296
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Source/cmJSONState.h

+ 1 - 1
Source/cmJSONState.h

@@ -65,7 +65,7 @@ public:
   std::vector<JsonPair> parseStack;
   std::vector<Error> errors;
   std::string doc;
-  bool allowComments;
+  bool allowComments = false;
 
 private:
   std::string GetJsonContext(Location loc);