From 7e16ce5a84c64eb60e6c1e984512ec58154a7b4c Mon Sep 17 00:00:00 2001 From: Amaury Sechet Date: Thu, 21 Apr 2016 21:36:11 +0000 Subject: Remove various warnings. NFC llvm-svn: 267061 --- llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp | 3 +-- llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'llvm/lib/DebugInfo') diff --git a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp index 999f2438d94..e927b60a447 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp @@ -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(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 diff --git a/llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp b/llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp index 05eac639d20..32c04beda78 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp @@ -32,15 +32,15 @@ PDB_ErrorCode RawSession::createFromPdb(StringRef Path, /*RequiresNullTerminator=*/false); std::error_code EC; - if (EC = ErrorOrBuffer.getError()) + if ((EC = ErrorOrBuffer.getError())) return PDB_ErrorCode::CouldNotCreateImpl; std::unique_ptr &Buffer = ErrorOrBuffer.get(); std::unique_ptr 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))); -- cgit v1.2.3