[llvm] 9976287 - llvm-rc - fix uninitialized variable warnings. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 05:27:04 PST 2019
Author: Simon Pilgrim
Date: 2019-11-18T13:26:50Z
New Revision: 9976287219cd05ec02770c22b68344b431d2e3b1
URL: https://github.com/llvm/llvm-project/commit/9976287219cd05ec02770c22b68344b431d2e3b1
DIFF: https://github.com/llvm/llvm-project/commit/9976287219cd05ec02770c22b68344b431d2e3b1.diff
LOG: llvm-rc - fix uninitialized variable warnings. NFC.
Added:
Modified:
llvm/tools/llvm-rc/ResourceFileWriter.h
llvm/tools/llvm-rc/ResourceScriptToken.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-rc/ResourceFileWriter.h b/llvm/tools/llvm-rc/ResourceFileWriter.h
index 1d7583db1149..673830601e86 100644
--- a/llvm/tools/llvm-rc/ResourceFileWriter.h
+++ b/llvm/tools/llvm-rc/ResourceFileWriter.h
@@ -72,7 +72,7 @@ class ResourceFileWriter : public Visitor {
// function to do it.
Error dumpAllStringTables();
- bool AppendNull; // Append '\0' to each existing STRINGTABLE element?
+ bool AppendNull = false; // Append '\0' to each existing STRINGTABLE element?
struct ObjectInfo {
uint16_t LanguageInfo;
diff --git a/llvm/tools/llvm-rc/ResourceScriptToken.cpp b/llvm/tools/llvm-rc/ResourceScriptToken.cpp
index bb0b3bdab03c..175374788769 100644
--- a/llvm/tools/llvm-rc/ResourceScriptToken.cpp
+++ b/llvm/tools/llvm-rc/ResourceScriptToken.cpp
@@ -84,7 +84,7 @@ namespace {
class Tokenizer {
public:
- Tokenizer(StringRef Input) : Data(Input), DataLength(Input.size()) {}
+ Tokenizer(StringRef Input) : Data(Input), DataLength(Input.size()), Pos(0) {}
Expected<std::vector<RCToken>> run();
More information about the llvm-commits
mailing list