aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/COFFObjectFile.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-11-28 22:19:32 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-11-28 22:19:32 +0000
commit9339d4556ec87115614f8fe80dffa14867f321f4 (patch)
tree7cbf89ed9d7c4df75add23751933c3981fc3f165 /llvm/lib/Object/COFFObjectFile.cpp
parent270e4511a717cf9544af895f5f14e5bf4b421118 (diff)
downloadllvm-9339d4556ec87115614f8fe80dffa14867f321f4.zip
llvm-9339d4556ec87115614f8fe80dffa14867f321f4.tar.gz
llvm-9339d4556ec87115614f8fe80dffa14867f321f4.tar.bz2
Fix some possible gcc-4.2 may be used uninitialized warnings.
llvm-svn: 145292
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/COFFObjectFile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index c6ce562..5f2a11e 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/lib/Object/COFFObjectFile.cpp
@@ -283,7 +283,7 @@ error_code COFFObjectFile::getSymbolSection(DataRefImpl Symb,
if (symb->SectionNumber <= COFF::IMAGE_SYM_UNDEFINED)
Result = end_sections();
else {
- const coff_section *sec;
+ const coff_section *sec = 0;
if (error_code ec = getSection(symb->SectionNumber, sec)) return ec;
DataRefImpl Sec;
std::memset(&Sec, 0, sizeof(Sec));
@@ -389,7 +389,7 @@ error_code COFFObjectFile::sectionContainsSymbol(DataRefImpl Sec,
bool &Result) const {
const coff_section *sec = toSec(Sec);
const coff_symbol *symb = toSymb(Symb);
- const coff_section *symb_sec;
+ const coff_section *symb_sec = 0;
if (error_code ec = getSection(symb->SectionNumber, symb_sec)) return ec;
if (symb_sec == sec)
Result = true;