[llvm] r267061 - Remove various warnings. NFC

Amaury Sechet via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 14:36:14 PDT 2016


Author: deadalnix
Date: Thu Apr 21 16:36:11 2016
New Revision: 267061

URL: http://llvm.org/viewvc/llvm-project?rev=267061&view=rev
Log:
Remove various warnings. NFC

Modified:
    llvm/trunk/lib/DebugInfo/PDB/Raw/PDBFile.cpp
    llvm/trunk/lib/DebugInfo/PDB/Raw/RawSession.cpp

Modified: llvm/trunk/lib/DebugInfo/PDB/Raw/PDBFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Raw/PDBFile.cpp?rev=267061&r1=267060&r2=267061&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Raw/PDBFile.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Raw/PDBFile.cpp Thu Apr 21 16:36:11 2016
@@ -163,7 +163,6 @@ std::error_code PDBFile::parseStreamData
   uint32_t NumStreams = 0;
   uint32_t StreamIdx = 0;
   uint64_t DirectoryBytesRead = 0;
-  std::error_code EC;
 
   MemoryBufferRef M = *Context->Buffer;
   const SuperBlock *SB = Context->SB;
@@ -185,7 +184,7 @@ std::error_code PDBFile::parseStreamData
         makeArrayRef(reinterpret_cast<const uint32_t *>(M.getBufferStart() +
                                                         DirectoryBlockOffset),
                      SB->BlockSize / sizeof(support::ulittle32_t));
-    if (EC = checkOffset(M, DirectoryBlock))
+    if (auto EC = checkOffset(M, DirectoryBlock))
       return EC;
 
     // We read data out of the directory four bytes at a time.  Depending on

Modified: llvm/trunk/lib/DebugInfo/PDB/Raw/RawSession.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Raw/RawSession.cpp?rev=267061&r1=267060&r2=267061&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Raw/RawSession.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Raw/RawSession.cpp Thu Apr 21 16:36:11 2016
@@ -32,15 +32,15 @@ PDB_ErrorCode RawSession::createFromPdb(
                                    /*RequiresNullTerminator=*/false);
 
   std::error_code EC;
-  if (EC = ErrorOrBuffer.getError())
+  if ((EC = ErrorOrBuffer.getError()))
     return PDB_ErrorCode::CouldNotCreateImpl;
 
   std::unique_ptr<MemoryBuffer> &Buffer = ErrorOrBuffer.get();
 
   std::unique_ptr<PDBFile> File(new PDBFile(std::move(Buffer)));
-  if (EC = File->parseFileHeaders())
+  if ((EC = File->parseFileHeaders()))
     return PDB_ErrorCode::InvalidFileFormat;
-  if (EC = File->parseStreamData())
+  if ((EC = File->parseStreamData()))
     return PDB_ErrorCode::InvalidFileFormat;
 
   Session.reset(new RawSession(std::move(File)));




More information about the llvm-commits mailing list