diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-13 01:59:24 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-13 01:59:24 +0000 |
commit | 40ddfedd6c1c9bc704a08d7cd688869a60284efc (patch) | |
tree | 54f80c79430146337550cbc56d8ae25d0e2428ce /llvm/lib/Object/COFFObjectFile.cpp | |
parent | 487f2a37bf47031c0acda79224f865d7350ed057 (diff) | |
download | bcm5719-llvm-40ddfedd6c1c9bc704a08d7cd688869a60284efc.tar.gz bcm5719-llvm-40ddfedd6c1c9bc704a08d7cd688869a60284efc.zip |
Silence false positive uninitialized variable warnings from GCC.
llvm-svn: 139573
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/COFFObjectFile.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp index 594fcd16981..2cf4b9c5c64 100644 --- a/llvm/lib/Object/COFFObjectFile.cpp +++ b/llvm/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); |