[llvm-commits] [llvm] r139573 - /llvm/trunk/lib/Object/COFFObjectFile.cpp
Benjamin Kramer
benny.kra at googlemail.com
Mon Sep 12 18:59:25 PDT 2011
Author: d0k
Date: Mon Sep 12 20:59:24 2011
New Revision: 139573
URL: http://llvm.org/viewvc/llvm-project?rev=139573&view=rev
Log:
Silence false positive uninitialized variable warnings from GCC.
Modified:
llvm/trunk/lib/Object/COFFObjectFile.cpp
Modified: llvm/trunk/lib/Object/COFFObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/COFFObjectFile.cpp?rev=139573&r1=139572&r2=139573&view=diff
==============================================================================
--- llvm/trunk/lib/Object/COFFObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/COFFObjectFile.cpp Mon Sep 12 20:59:24 2011
@@ -447,7 +447,7 @@
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 @@
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::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);
More information about the llvm-commits
mailing list