diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-04-22 07:23:04 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-04-22 07:23:04 +0000 |
commit | eb23f9e92e607990ffe986735e10a8dec713909a (patch) | |
tree | 6da5e3e2957aac32e0356164b80a47b2afc4797e /lib/Support/YAMLParser.cpp | |
parent | d46575f1908b1fb9950e610a1f36733893ad44b1 (diff) |
Remove some potential warnings about variables used uninitialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155307 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/YAMLParser.cpp')
-rw-r--r-- | lib/Support/YAMLParser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Support/YAMLParser.cpp b/lib/Support/YAMLParser.cpp index 9b5896de7a..c66c755c6e 100644 --- a/lib/Support/YAMLParser.cpp +++ b/lib/Support/YAMLParser.cpp @@ -1732,7 +1732,7 @@ StringRef ScalarNode::unescapeDoubleQuoted( StringRef UnquotedValue if (UnquotedValue.size() < 3) // TODO: Report error. break; - unsigned int UnicodeScalarValue; + unsigned int UnicodeScalarValue = 0; UnquotedValue.substr(1, 2).getAsInteger(16, UnicodeScalarValue); encodeUTF8(UnicodeScalarValue, Storage); UnquotedValue = UnquotedValue.substr(2); @@ -1742,7 +1742,7 @@ StringRef ScalarNode::unescapeDoubleQuoted( StringRef UnquotedValue if (UnquotedValue.size() < 5) // TODO: Report error. break; - unsigned int UnicodeScalarValue; + unsigned int UnicodeScalarValue = 0; UnquotedValue.substr(1, 4).getAsInteger(16, UnicodeScalarValue); encodeUTF8(UnicodeScalarValue, Storage); UnquotedValue = UnquotedValue.substr(4); @@ -1752,7 +1752,7 @@ StringRef ScalarNode::unescapeDoubleQuoted( StringRef UnquotedValue if (UnquotedValue.size() < 9) // TODO: Report error. break; - unsigned int UnicodeScalarValue; + unsigned int UnicodeScalarValue = 0; UnquotedValue.substr(1, 8).getAsInteger(16, UnicodeScalarValue); encodeUTF8(UnicodeScalarValue, Storage); UnquotedValue = UnquotedValue.substr(8); |