From: Simon Pilgrim Date: Fri, 31 Mar 2017 10:45:35 +0000 (+0000) Subject: Fix signed/unsigned warning X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=347f8943df565f72bbfcfa7ba943dbf658c992a5;p=llvm Fix signed/unsigned warning git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299194 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/MC/WasmObjectWriter.cpp b/lib/MC/WasmObjectWriter.cpp index 548d99fe4b9..159cc3b4def 100644 --- a/lib/MC/WasmObjectWriter.cpp +++ b/lib/MC/WasmObjectWriter.cpp @@ -660,7 +660,7 @@ void WasmObjectWriter::writeObject(MCAssembler &Asm, unsigned n; G.InitialValue = decodeSLEB128(p, &n); G.ImportIndex = 0; - if (n > end - p) + if ((ptrdiff_t)n > end - p) report_fatal_error("global initial value must be valid SLEB128"); p += n; }