[llvm-commits] [llvm] r155307 - in /llvm/trunk/lib: Support/YAMLParser.cpp Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
Bill Wendling
isanbard at gmail.com
Sun Apr 22 00:23:04 PDT 2012
Author: void
Date: Sun Apr 22 02:23:04 2012
New Revision: 155307
URL: http://llvm.org/viewvc/llvm-project?rev=155307&view=rev
Log:
Remove some potential warnings about variables used uninitialized.
Modified:
llvm/trunk/lib/Support/YAMLParser.cpp
llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
Modified: llvm/trunk/lib/Support/YAMLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/YAMLParser.cpp?rev=155307&r1=155306&r2=155307&view=diff
==============================================================================
--- llvm/trunk/lib/Support/YAMLParser.cpp (original)
+++ llvm/trunk/lib/Support/YAMLParser.cpp Sun Apr 22 02:23:04 2012
@@ -1732,7 +1732,7 @@
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 @@
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 @@
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);
Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp?rev=155307&r1=155306&r2=155307&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp Sun Apr 22 02:23:04 2012
@@ -194,7 +194,7 @@
assert (Kind == MCExpr::SymbolRef);
- Mips::Fixups FixupKind;
+ Mips::Fixups FixupKind = Mips::Fixups(0);
switch(cast<MCSymbolRefExpr>(Expr)->getKind()) {
case MCSymbolRefExpr::VK_Mips_GPREL:
More information about the llvm-commits
mailing list