Fix warnings.
authorMichael J. Spencer <bigcheesegs@gmail.com>
Tue, 5 Jul 2011 14:48:59 +0000 (14:48 +0000)
committerMichael J. Spencer <bigcheesegs@gmail.com>
Tue, 5 Jul 2011 14:48:59 +0000 (14:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134408 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Object/COFFObjectFile.cpp

index 18aad9a9517ce3c628af82070227a15a54c09525..158263e5b1082e551dbbc49ad04cdd30e14b74b1 100644 (file)
@@ -117,7 +117,7 @@ error_code COFFObjectFile::getSymbolNext(DataRefImpl Symb,
 error_code COFFObjectFile::getSymbolAddress(DataRefImpl Symb,
                                             uint64_t &Result) const {
   const coff_symbol *symb = toSymb(Symb);
-  const coff_section *Section;
+  const coff_section *Section = NULL;
   if (error_code ec = getSection(symb->SectionNumber, Section))
     return ec;
   char Type;
@@ -138,7 +138,7 @@ error_code COFFObjectFile::getSymbolSize(DataRefImpl Symb,
   //        in the same section as this symbol, and looking for either the next
   //        symbol, or the end of the section.
   const coff_symbol *symb = toSymb(Symb);
-  const coff_section *Section;
+  const coff_section *Section = NULL;
   if (error_code ec = getSection(symb->SectionNumber, Section))
     return ec;
   char Type;
@@ -171,7 +171,7 @@ error_code COFFObjectFile::getSymbolNMTypeChar(DataRefImpl Symb,
 
   uint32_t Characteristics = 0;
   if (symb->SectionNumber > 0) {
-    const coff_section *Section;
+    const coff_section *Section = NULL;
     if (error_code ec = getSection(symb->SectionNumber, Section))
       return ec;
     Characteristics = Section->Characteristics;