[cfe-commits] r141487 - in /cfe/trunk/lib: Driver/ToolChains.cpp Parse/ParseStmt.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Sat Oct 8 04:31:53 PDT 2011
Author: chapuni
Date: Sat Oct 8 06:31:53 2011
New Revision: 141487
URL: http://llvm.org/viewvc/llvm-project?rev=141487&view=rev
Log:
Fix "Uninitialized" warnings.
Modified:
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Parse/ParseStmt.cpp
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=141487&r1=141486&r2=141487&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Sat Oct 8 06:31:53 2011
@@ -1511,11 +1511,11 @@
unsigned Major, Minor, Patch;
static GCCVersion Parse(StringRef VersionText) {
- const GCCVersion BadVersion = {};
+ const GCCVersion BadVersion = {0, 0, 0};
std::pair<StringRef, StringRef> First = VersionText.split('.');
std::pair<StringRef, StringRef> Second = First.second.split('.');
- GCCVersion GoodVersion = {};
+ GCCVersion GoodVersion = {0, 0, 0};
if (First.first.getAsInteger(10, GoodVersion.Major))
return BadVersion;
if (Second.first.getAsInteger(10, GoodVersion.Minor))
@@ -1605,7 +1605,7 @@
// Loop over the various components which exist and select the best GCC
// installation available. GCC installs are ranked by version number.
- GCCVersion BestVersion = {};
+ GCCVersion BestVersion = {0, 0, 0};
for (unsigned i = 0, ie = Prefixes.size(); i < ie; ++i) {
if (!PathExists(Prefixes[i]))
continue;
Modified: cfe/trunk/lib/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmt.cpp?rev=141487&r1=141486&r2=141487&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/lib/Parse/ParseStmt.cpp Sat Oct 8 06:31:53 2011
@@ -1579,10 +1579,10 @@
SourceLocation EndLoc = AsmLoc;
do {
bool InBraces = false;
- unsigned short savedBraceCount;
+ unsigned short savedBraceCount = 0;
bool InAsmComment = false;
FileID FID;
- unsigned LineNo;
+ unsigned LineNo = 0;
unsigned NumTokensRead = 0;
SourceLocation LBraceLoc;
More information about the cfe-commits
mailing list