Clear some warnings and enable -Werror for NuttX (#1756)

This commit is contained in:
Huang Qi
2022-11-28 09:44:33 +08:00
committed by GitHub
parent 1465901f6f
commit 93d3d09aa1
7 changed files with 20 additions and 13 deletions

View File

@ -555,7 +555,7 @@ execute_func(WASMModuleInstanceCommon *module_inst, const char *name,
case VALUE_TYPE_FUNCREF:
{
if (argv1[k] != NULL_REF)
os_printf("%u:ref.func", argv1[k]);
os_printf("%" PRIu32 ":ref.func", argv1[k]);
else
os_printf("func:ref.null");
k++;

View File

@ -379,8 +379,13 @@ wasm_native_unregister_natives(const char *module_name,
bool
wasm_native_init()
{
#if WASM_ENABLE_SPEC_TEST != 0 || WASM_ENABLE_LIBC_BUILTIN != 0 \
|| WASM_ENABLE_BASE_LIB != 0 || WASM_ENABLE_LIBC_EMCC != 0 \
|| WASM_ENABLE_LIB_RATS != 0 || WASM_ENABLE_WASI_NN != 0 \
|| WASM_ENABLE_APP_FRAMEWORK != 0
NativeSymbol *native_symbols;
uint32 n_native_symbols;
#endif
#if WASM_ENABLE_LIBC_BUILTIN != 0
n_native_symbols = get_libc_builtin_export_apis(&native_symbols);
@ -456,9 +461,14 @@ wasm_native_init()
#endif
return true;
#if WASM_ENABLE_SPEC_TEST != 0 || WASM_ENABLE_LIBC_BUILTIN != 0 \
|| WASM_ENABLE_BASE_LIB != 0 || WASM_ENABLE_LIBC_EMCC != 0 \
|| WASM_ENABLE_LIB_RATS != 0 || WASM_ENABLE_WASI_NN != 0 \
|| WASM_ENABLE_APP_FRAMEWORK != 0
fail:
wasm_native_destroy();
return false;
#endif
}
void