diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-10-08 11:31:53 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-10-08 11:31:53 +0000 |
commit | 96e21710e8bf64514ca7d3720cb3b2823eec9164 (patch) | |
tree | 26baf683715c5ad402f1148b2232d234d6d18919 | |
parent | a789ca9b967abe47b84df83bcf4afb150856a8d9 (diff) |
Fix "Uninitialized" warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141487 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Driver/ToolChains.cpp | 6 | ||||
-rw-r--r-- | lib/Parse/ParseStmt.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 1914fff0dd..0f9f471790 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1511,11 +1511,11 @@ class GCCInstallationDetector { 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 @@ public: // 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; diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp index 7754c9855d..22a1eb3744 100644 --- a/lib/Parse/ParseStmt.cpp +++ b/lib/Parse/ParseStmt.cpp @@ -1579,10 +1579,10 @@ StmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) { 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; |