From f9774c32537a963c296c3bb16010d7aca9524654 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sun, 22 Apr 2012 07:23:04 +0000 Subject: [PATCH] Remove some potential warnings about variables used uninitialized. llvm-svn: 155307 --- llvm/lib/Support/YAMLParser.cpp | 6 +++--- llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Support/YAMLParser.cpp b/llvm/lib/Support/YAMLParser.cpp index 9b5896de7aa1..c66c755c6ec1 100644 --- a/llvm/lib/Support/YAMLParser.cpp +++ b/llvm/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); diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp index 27954b174ed9..4ed2be0f430e 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp +++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp @@ -194,7 +194,7 @@ getMachineOpValue(const MCInst &MI, const MCOperand &MO, assert (Kind == MCExpr::SymbolRef); - Mips::Fixups FixupKind; + Mips::Fixups FixupKind = Mips::Fixups(0); switch(cast(Expr)->getKind()) { case MCSymbolRefExpr::VK_Mips_GPREL: