summaryrefslogtreecommitdiff
path: root/lib/Object
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-09-13 01:59:24 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-09-13 01:59:24 +0000
commitcee58a69fa3f0f291c0c88ce0d29099a95495ae7 (patch)
treeb78bb37a1d2d7b78ee39e286f3fbec6042deee6f /lib/Object
parentb5a457c4cbc71db6ae313ef1bf8eadac65767ab0 (diff)
downloadllvm-cee58a69fa3f0f291c0c88ce0d29099a95495ae7.tar.gz
llvm-cee58a69fa3f0f291c0c88ce0d29099a95495ae7.tar.bz2
llvm-cee58a69fa3f0f291c0c88ce0d29099a95495ae7.tar.xz
Silence false positive uninitialized variable warnings from GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139573 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object')
-rw-r--r--lib/Object/COFFObjectFile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp
index 594fcd1698..2cf4b9c5c6 100644
--- a/lib/Object/COFFObjectFile.cpp
+++ b/lib/Object/COFFObjectFile.cpp
@@ -447,7 +447,7 @@ error_code COFFObjectFile::getString(uint32_t offset,
const coff_relocation *COFFObjectFile::toRel(DataRefImpl Rel) const {
assert(Rel.d.b < Header->NumberOfSections && "Section index out of range!");
- const coff_section *Sect;
+ const coff_section *Sect = NULL;
getSection(Rel.d.b, Sect);
assert(Rel.d.a < Sect->NumberOfRelocations && "Relocation index out of range!");
return
@@ -463,7 +463,7 @@ error_code COFFObjectFile::getRelocationNext(DataRefImpl Rel,
if (++Rel.d.a >= Sect->NumberOfRelocations) {
Rel.d.a = 0;
while (++Rel.d.b < Header->NumberOfSections) {
- const coff_section *Sect;
+ const coff_section *Sect = NULL;
getSection(Rel.d.b, Sect);
if (Sect->NumberOfRelocations > 0)
break;
@@ -474,7 +474,7 @@ error_code COFFObjectFile::getRelocationNext(DataRefImpl Rel,
}
error_code COFFObjectFile::getRelocationAddress(DataRefImpl Rel,
uint64_t &Res) const {
- const coff_section *Sect;
+ const coff_section *Sect = NULL;
if (error_code ec = getSection(Rel.d.b, Sect))
return ec;
const coff_relocation* R = toRel(Rel);