From 40ddfedd6c1c9bc704a08d7cd688869a60284efc Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 13 Sep 2011 01:59:24 +0000 Subject: Silence false positive uninitialized variable warnings from GCC. llvm-svn: 139573 --- llvm/lib/Object/COFFObjectFile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Object/COFFObjectFile.cpp') diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp index 594fcd1..2cf4b9c 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); -- cgit v1.1