Skip to content

Commit c3dd559

Browse files
authored
Fix a compilation warning (#3682)
Fix: ``` wamr/core/iwasm/compilation/aot_llvm.c: In function ‘insert_native_symbol’: wamr/core/iwasm/compilation/aot_llvm.c:3290:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare] 3290 | if (ret < 0 || ret + 1 > sizeof(sym->symbol)) { | ^ ``` Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
1 parent 3ce242b commit c3dd559

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/iwasm/compilation/aot_llvm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3287,7 +3287,7 @@ insert_native_symbol(AOTCompContext *comp_ctx, const char *symbol, int32 idx)
32873287
memset(sym, 0, sizeof(AOTNativeSymbol));
32883288
bh_assert(strlen(symbol) <= sizeof(sym->symbol));
32893289
ret = snprintf(sym->symbol, sizeof(sym->symbol), "%s", symbol);
3290-
if (ret < 0 || ret + 1 > sizeof(sym->symbol)) {
3290+
if (ret < 0 || ret + 1 > (int)sizeof(sym->symbol)) {
32913291
aot_set_last_error_v("symbol name too long: %s", symbol);
32923292
return false;
32933293
}

0 commit comments

Comments
 (0)