lib/Object: Suppress warnings on gcc-4.3.4 cygwin
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sat, 8 Oct 2011 11:22:53 +0000 (11:22 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sat, 8 Oct 2011 11:22:53 +0000 (11:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141485 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Object/Archive.cpp
lib/Object/COFFObjectFile.cpp

index aeb629b7f23ffd0248a9133c5ff9e0c2254d719d..e2eaff53c1f1125943bb8581f6adcff4722ed79c 100644 (file)
@@ -146,7 +146,7 @@ Archive::Archive(MemoryBuffer *source, error_code &ec)
   // Get the string table. It's the 3rd member.
   child_iterator StrTable = begin_children();
   child_iterator e = end_children();
-  for (int i = 0; StrTable != e && i < 2; ++StrTable, ++i);
+  for (int i = 0; StrTable != e && i < 2; ++StrTable, ++i) {}
 
   // Check to see if there were 3 members, or the 3rd member wasn't named "//".
   StringRef name;
index ea9f44bab4dc3d40dea85182e5d61912361e7e50..91492db2f0d6726be7443a774ce33af14ae6b63b 100644 (file)
@@ -640,7 +640,7 @@ error_code COFFObjectFile::getRelocationAdditionalInfo(DataRefImpl Rel,
 error_code COFFObjectFile::getRelocationValueString(DataRefImpl Rel,
                                           SmallVectorImpl<char> &Result) const {
   const coff_relocation *reloc = toRel(Rel);
-  const coff_symbol *symb;
+  const coff_symbol *symb = 0;
   if (error_code ec = getSymbol(reloc->SymbolTableIndex, symb)) return ec;
   DataRefImpl sym;
   ::memset(&sym, 0, sizeof(sym));