Skip to content

Commit 7e16ce5

Browse files
committed
Remove various warnings. NFC
llvm-svn: 267061
1 parent af7aaae commit 7e16ce5

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ std::error_code PDBFile::parseStreamData() {
163163
uint32_t NumStreams = 0;
164164
uint32_t StreamIdx = 0;
165165
uint64_t DirectoryBytesRead = 0;
166-
std::error_code EC;
167166

168167
MemoryBufferRef M = *Context->Buffer;
169168
const SuperBlock *SB = Context->SB;
@@ -185,7 +184,7 @@ std::error_code PDBFile::parseStreamData() {
185184
makeArrayRef(reinterpret_cast<const uint32_t *>(M.getBufferStart() +
186185
DirectoryBlockOffset),
187186
SB->BlockSize / sizeof(support::ulittle32_t));
188-
if (EC = checkOffset(M, DirectoryBlock))
187+
if (auto EC = checkOffset(M, DirectoryBlock))
189188
return EC;
190189

191190
// We read data out of the directory four bytes at a time. Depending on

llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ PDB_ErrorCode RawSession::createFromPdb(StringRef Path,
3232
/*RequiresNullTerminator=*/false);
3333

3434
std::error_code EC;
35-
if (EC = ErrorOrBuffer.getError())
35+
if ((EC = ErrorOrBuffer.getError()))
3636
return PDB_ErrorCode::CouldNotCreateImpl;
3737

3838
std::unique_ptr<MemoryBuffer> &Buffer = ErrorOrBuffer.get();
3939

4040
std::unique_ptr<PDBFile> File(new PDBFile(std::move(Buffer)));
41-
if (EC = File->parseFileHeaders())
41+
if ((EC = File->parseFileHeaders()))
4242
return PDB_ErrorCode::InvalidFileFormat;
43-
if (EC = File->parseStreamData())
43+
if ((EC = File->parseStreamData()))
4444
return PDB_ErrorCode::InvalidFileFormat;
4545

4646
Session.reset(new RawSession(std::move(File)));

0 commit comments

Comments
 (0)