OSDN Git Service

Object/WasmObjectFile: Fix comparison of different signs
authorMauro Rossi <issor.oruam@gmail.com>
Sat, 9 Jun 2018 21:08:43 +0000 (23:08 +0200)
committerMauro Rossi <issor.oruam@gmail.com>
Sun, 10 Jun 2018 20:53:30 +0000 (22:53 +0200)
commit16f5045794901e308431b81f8ab36e322dfc5913
tree3862cd956216496e65e340ebccfa3f8a5ffb098d
parent3cf130f42d68bdebafbc9bc9fb81cc757c8a3c9c
Object/WasmObjectFile: Fix comparison of different signs

Fixes the following building error:

external/llvm/lib/Object/WasmObjectFile.cpp:978:14:
error: comparison of integers of different signs:
'uint32_t' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
    if (Size > Ctx.End - Ctx.Ptr)
        ~~~~ ^ ~~~~~~~~~~~~~~~~~
1 error generated.

Fixes: 50617cfe72 ("[WebAssembly] Add more error checking to object file parsing")
lib/Object/WasmObjectFile.cpp