summaryrefslogtreecommitdiff
path: root/lib/Object
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
commita483fc8e6f9533317f517f2d03f3a41ec0aee663 (patch)
tree42a7a62d374a99c6aaa7e4158f3e0e1b5cbfad4d /lib/Object
parenta3980cccf7537e64ebc7c8d707d98b788991f549 (diff)
downloadllvm-a483fc8e6f9533317f517f2d03f3a41ec0aee663.tar.gz
llvm-a483fc8e6f9533317f517f2d03f3a41ec0aee663.tar.bz2
llvm-a483fc8e6f9533317f517f2d03f3a41ec0aee663.tar.xz
Fix some possible gcc-4.2 may be used uninitialized warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object')
-rw-r--r--lib/Object/COFFObjectFile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp
index c6ce56221a..5f2a11ed20 100644
--- a/lib/Object/COFFObjectFile.cpp
+++ b/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;