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
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;
}
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);