[llvm] r335587 - Fix MSVC "signed/unsigned mismatch" warning. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 26 03:02:12 PDT 2018
Author: rksimon
Date: Tue Jun 26 03:02:12 2018
New Revision: 335587
URL: http://llvm.org/viewvc/llvm-project?rev=335587&view=rev
Log:
Fix MSVC "signed/unsigned mismatch" warning. NFCI.
Modified:
llvm/trunk/lib/Object/WasmObjectFile.cpp
Modified: llvm/trunk/lib/Object/WasmObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/WasmObjectFile.cpp?rev=335587&r1=335586&r2=335587&view=diff
==============================================================================
--- llvm/trunk/lib/Object/WasmObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/WasmObjectFile.cpp Tue Jun 26 03:02:12 2018
@@ -975,7 +975,7 @@ Error WasmObjectFile::parseDataSection(R
if (Error Err = readInitExpr(Segment.Data.Offset, Ctx))
return Err;
uint32_t Size = readVaruint32(Ctx);
- if (Size > Ctx.End - Ctx.Ptr)
+ if (Size > (size_t)(Ctx.End - Ctx.Ptr))
return make_error<GenericBinaryError>("Invalid segment size",
object_error::parse_failed);
Segment.Data.Content = ArrayRef<uint8_t>(Ctx.Ptr, Size);
More information about the llvm-commits
mailing list