Appease GCC strict prototypes warning (#3775)

This commit is contained in:
YAMAMOTO Takashi 2024-09-10 10:42:23 +09:00 committed by GitHub
parent cbc2078898
commit f453d9d5ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
30 changed files with 335 additions and 335 deletions

View File

@ -226,7 +226,7 @@ SymbolMap *
get_target_symbol_map(uint32 *sym_num);
uint32
get_plt_table_size();
get_plt_table_size(void);
void
init_plt_table(uint8 *plt);

View File

@ -648,7 +648,7 @@ aot_check_app_addr_and_convert(AOTModuleInstance *module_inst, bool is_str,
void **p_native_addr);
uint32
aot_get_plt_table_size();
aot_get_plt_table_size(void);
void *
aot_memmove(void *dest, const void *src, size_t n);

View File

@ -79,7 +79,7 @@ get_current_target(char *target_buf, uint32 target_buf_size)
}
static uint32
get_plt_item_size()
get_plt_item_size(void)
{
/* 6*4 bytes instructions and 8 bytes symbol address */
return 32;

View File

@ -12,102 +12,102 @@
#define R_ARM_MOVT_ABS 44
/* clang-format off */
void __adddf3();
void __addsf3();
void __aeabi_d2f();
void __aeabi_d2iz();
void __aeabi_d2lz();
void __aeabi_d2uiz();
void __aeabi_d2ulz();
void __aeabi_dadd();
void __aeabi_dcmpeq();
void __aeabi_dcmpge();
void __aeabi_dcmpgt();
void __aeabi_dcmple();
void __aeabi_dcmplt();
void __aeabi_dcmpun();
void __aeabi_ddiv();
void __aeabi_dmul();
void __aeabi_dsub();
void __aeabi_f2d();
void __aeabi_f2iz();
void __aeabi_f2lz();
void __aeabi_f2ulz();
void __aeabi_fadd();
void __aeabi_fcmpeq();
void __aeabi_fcmpge();
void __aeabi_fcmpgt();
void __aeabi_fcmple();
void __aeabi_fcmplt();
void __aeabi_fcmpun();
void __aeabi_fdiv();
void __aeabi_fmul();
void __aeabi_fsub();
void __aeabi_i2d();
void __aeabi_i2f();
void __aeabi_idiv();
void __aeabi_idivmod();
void __aeabi_l2d();
void __aeabi_l2f();
void __aeabi_ldivmod();
void __aeabi_memclr();
void __aeabi_memcpy();
void __aeabi_memmove();
void __aeabi_memset();
void __aeabi_ui2d();
void __aeabi_ui2f();
void __aeabi_uidiv();
void __aeabi_uidivmod();
void __aeabi_ul2d();
void __aeabi_ul2f();
void __aeabi_uldivmod();
void __clzsi2();
void __divdf3();
void __divdi3();
void __divsf3();
void __divsi3();
void __eqdf2();
void __eqsf2();
void __extendsfdf2();
void __fixdfdi();
void __fixdfsi();
void __fixsfdi();
void __fixsfsi();
void __fixunsdfdi();
void __fixunsdfsi();
void __fixunssfdi();
void __floatdidf();
void __floatdisf();
void __floatsidf();
void __floatsisf();
void __floatundidf();
void __floatundisf();
void __floatunsidf();
void __floatunsisf();
void __gedf2();
void __gesf2();
void __gtdf2();
void __gtsf2();
void __ledf2();
void __lesf2();
void __ltdf2();
void __ltsf2();
void __moddi3();
void __modsi3();
void __muldf3();
void __mulsf3();
void __nedf2();
void __nesf2();
void __subdf3();
void __subsf3();
void __truncdfsf2();
void __udivdi3();
void __udivmoddi4();
void __udivsi3();
void __umoddi3();
void __umodsi3();
void __unorddf2();
void __unordsf2();
void __adddf3(void);
void __addsf3(void);
void __aeabi_d2f(void);
void __aeabi_d2iz(void);
void __aeabi_d2lz(void);
void __aeabi_d2uiz(void);
void __aeabi_d2ulz(void);
void __aeabi_dadd(void);
void __aeabi_dcmpeq(void);
void __aeabi_dcmpge(void);
void __aeabi_dcmpgt(void);
void __aeabi_dcmple(void);
void __aeabi_dcmplt(void);
void __aeabi_dcmpun(void);
void __aeabi_ddiv(void);
void __aeabi_dmul(void);
void __aeabi_dsub(void);
void __aeabi_f2d(void);
void __aeabi_f2iz(void);
void __aeabi_f2lz(void);
void __aeabi_f2ulz(void);
void __aeabi_fadd(void);
void __aeabi_fcmpeq(void);
void __aeabi_fcmpge(void);
void __aeabi_fcmpgt(void);
void __aeabi_fcmple(void);
void __aeabi_fcmplt(void);
void __aeabi_fcmpun(void);
void __aeabi_fdiv(void);
void __aeabi_fmul(void);
void __aeabi_fsub(void);
void __aeabi_i2d(void);
void __aeabi_i2f(void);
void __aeabi_idiv(void);
void __aeabi_idivmod(void);
void __aeabi_l2d(void);
void __aeabi_l2f(void);
void __aeabi_ldivmod(void);
void __aeabi_memclr(void);
void __aeabi_memcpy(void);
void __aeabi_memmove(void);
void __aeabi_memset(void);
void __aeabi_ui2d(void);
void __aeabi_ui2f(void);
void __aeabi_uidiv(void);
void __aeabi_uidivmod(void);
void __aeabi_ul2d(void);
void __aeabi_ul2f(void);
void __aeabi_uldivmod(void);
void __clzsi2(void);
void __divdf3(void);
void __divdi3(void);
void __divsf3(void);
void __divsi3(void);
void __eqdf2(void);
void __eqsf2(void);
void __extendsfdf2(void);
void __fixdfdi(void);
void __fixdfsi(void);
void __fixsfdi(void);
void __fixsfsi(void);
void __fixunsdfdi(void);
void __fixunsdfsi(void);
void __fixunssfdi(void);
void __floatdidf(void);
void __floatdisf(void);
void __floatsidf(void);
void __floatsisf(void);
void __floatundidf(void);
void __floatundisf(void);
void __floatunsidf(void);
void __floatunsisf(void);
void __gedf2(void);
void __gesf2(void);
void __gtdf2(void);
void __gtsf2(void);
void __ledf2(void);
void __lesf2(void);
void __ltdf2(void);
void __ltsf2(void);
void __moddi3(void);
void __modsi3(void);
void __muldf3(void);
void __mulsf3(void);
void __nedf2(void);
void __nesf2(void);
void __subdf3(void);
void __subsf3(void);
void __truncdfsf2(void);
void __udivdi3(void);
void __udivmoddi4(void);
void __udivsi3(void);
void __umoddi3(void);
void __umodsi3(void);
void __unorddf2(void);
void __unordsf2(void);
/* clang-format on */
static SymbolMap target_sym_map[] = {
@ -255,7 +255,7 @@ get_current_target(char *target_buf, uint32 target_buf_size)
#undef BUILD_TARGET_ARM_DEFAULT
uint32
get_plt_item_size()
get_plt_item_size(void)
{
/* 8 bytes instructions and 4 bytes symbol address */
return 12;

View File

@ -28,7 +28,7 @@ get_current_target(char *target_buf, uint32 target_buf_size)
}
static uint32
get_plt_item_size()
get_plt_item_size(void)
{
return 0;
}

View File

@ -49,58 +49,58 @@
#endif
/* clang-format off */
void __adddf3();
void __addsf3();
void __divdf3();
void __divdi3();
void __divsf3();
void __divsi3();
void __eqdf2();
void __eqsf2();
void __extendsfdf2();
void __fixdfdi();
void __fixdfsi();
void __fixsfdi();
void __fixsfsi();
void __fixunsdfdi();
void __fixunsdfsi();
void __fixunssfdi();
void __fixunssfsi();
void __floatdidf();
void __floatdisf();
void __floatsidf();
void __floatsisf();
void __floatundidf();
void __floatundisf();
void __floatunsidf();
void __floatunsisf();
void __gedf2();
void __gesf2();
void __gtdf2();
void __gtsf2();
void __ledf2();
void __lesf2();
void __ltdf2();
void __ltsf2();
void __moddi3();
void __modsi3();
void __muldf3();
void __muldi3();
void __mulsf3();
void __mulsi3();
void __nedf2();
void __negdf2();
void __negsf2();
void __nesf2();
void __subdf3();
void __subsf3();
void __truncdfsf2();
void __udivdi3();
void __udivsi3();
void __umoddi3();
void __umodsi3();
void __unorddf2();
void __unordsf2();
void __adddf3(void);
void __addsf3(void);
void __divdf3(void);
void __divdi3(void);
void __divsf3(void);
void __divsi3(void);
void __eqdf2(void);
void __eqsf2(void);
void __extendsfdf2(void);
void __fixdfdi(void);
void __fixdfsi(void);
void __fixsfdi(void);
void __fixsfsi(void);
void __fixunsdfdi(void);
void __fixunsdfsi(void);
void __fixunssfdi(void);
void __fixunssfsi(void);
void __floatdidf(void);
void __floatdisf(void);
void __floatsidf(void);
void __floatsisf(void);
void __floatundidf(void);
void __floatundisf(void);
void __floatunsidf(void);
void __floatunsisf(void);
void __gedf2(void);
void __gesf2(void);
void __gtdf2(void);
void __gtsf2(void);
void __ledf2(void);
void __lesf2(void);
void __ltdf2(void);
void __ltsf2(void);
void __moddi3(void);
void __modsi3(void);
void __muldf3(void);
void __muldi3(void);
void __mulsf3(void);
void __mulsi3(void);
void __nedf2(void);
void __negdf2(void);
void __negsf2(void);
void __nesf2(void);
void __subdf3(void);
void __subsf3(void);
void __truncdfsf2(void);
void __udivdi3(void);
void __udivsi3(void);
void __umoddi3(void);
void __umodsi3(void);
void __unorddf2(void);
void __unordsf2(void);
/* clang-format on */
static SymbolMap target_sym_map[] = {
@ -193,7 +193,7 @@ get_current_target(char *target_buf, uint32 target_buf_size)
}
uint32
get_plt_item_size()
get_plt_item_size(void)
{
#if __riscv_xlen == 64
/* auipc + ld + jalr + nop + addr */

View File

@ -14,102 +14,102 @@
#define R_ARM_THM_MOVT_PREL 50
/* clang-format off */
void __adddf3();
void __addsf3();
void __aeabi_d2f();
void __aeabi_d2iz();
void __aeabi_d2lz();
void __aeabi_d2uiz();
void __aeabi_d2ulz();
void __aeabi_dadd();
void __aeabi_dcmpeq();
void __aeabi_dcmpge();
void __aeabi_dcmpgt();
void __aeabi_dcmple();
void __aeabi_dcmplt();
void __aeabi_dcmpun();
void __aeabi_ddiv();
void __aeabi_dmul();
void __aeabi_dsub();
void __aeabi_f2d();
void __aeabi_f2iz();
void __aeabi_f2lz();
void __aeabi_f2ulz();
void __aeabi_fadd();
void __aeabi_fcmpeq();
void __aeabi_fcmpge();
void __aeabi_fcmpgt();
void __aeabi_fcmple();
void __aeabi_fcmplt();
void __aeabi_fcmpun();
void __aeabi_fdiv();
void __aeabi_fmul();
void __aeabi_fsub();
void __aeabi_i2d();
void __aeabi_i2f();
void __aeabi_idiv();
void __aeabi_idivmod();
void __aeabi_l2d();
void __aeabi_l2f();
void __aeabi_ldivmod();
void __aeabi_llsl();
void __aeabi_llsr();
void __aeabi_lmul();
void __aeabi_ui2d();
void __aeabi_ui2f();
void __aeabi_uidiv();
void __aeabi_uidivmod();
void __aeabi_ul2d();
void __aeabi_ul2f();
void __aeabi_uldivmod();
void __ashldi3();
void __clzsi2();
void __divdf3();
void __divdi3();
void __divsi3();
void __eqdf2();
void __eqsf2();
void __extendsfdf2();
void __fixdfdi();
void __fixdfsi();
void __fixsfdi();
void __fixunsdfdi();
void __fixunsdfsi();
void __fixunssfdi();
void __floatdidf();
void __floatdisf();
void __floatsidf();
void __floatsisf();
void __floatundidf();
void __floatundisf();
void __floatunsidf();
void __floatunsisf();
void __gedf2();
void __gesf2();
void __gtdf2();
void __gtsf2();
void __ledf2();
void __lesf2();
void __lshrdi3();
void __ltdf2();
void __ltsf2();
void __moddi3();
void __modsi3();
void __muldf3();
void __muldi3();
void __mulsf3();
void __nedf2();
void __nesf2();
void __subdf3();
void __subsf3();
void __truncdfsf2();
void __udivdi3();
void __udivmoddi4();
void __udivsi3();
void __umoddi3();
void __umodsi3();
void __unorddf2();
void __unordsf2();
void __adddf3(void);
void __addsf3(void);
void __aeabi_d2f(void);
void __aeabi_d2iz(void);
void __aeabi_d2lz(void);
void __aeabi_d2uiz(void);
void __aeabi_d2ulz(void);
void __aeabi_dadd(void);
void __aeabi_dcmpeq(void);
void __aeabi_dcmpge(void);
void __aeabi_dcmpgt(void);
void __aeabi_dcmple(void);
void __aeabi_dcmplt(void);
void __aeabi_dcmpun(void);
void __aeabi_ddiv(void);
void __aeabi_dmul(void);
void __aeabi_dsub(void);
void __aeabi_f2d(void);
void __aeabi_f2iz(void);
void __aeabi_f2lz(void);
void __aeabi_f2ulz(void);
void __aeabi_fadd(void);
void __aeabi_fcmpeq(void);
void __aeabi_fcmpge(void);
void __aeabi_fcmpgt(void);
void __aeabi_fcmple(void);
void __aeabi_fcmplt(void);
void __aeabi_fcmpun(void);
void __aeabi_fdiv(void);
void __aeabi_fmul(void);
void __aeabi_fsub(void);
void __aeabi_i2d(void);
void __aeabi_i2f(void);
void __aeabi_idiv(void);
void __aeabi_idivmod(void);
void __aeabi_l2d(void);
void __aeabi_l2f(void);
void __aeabi_ldivmod(void);
void __aeabi_llsl(void);
void __aeabi_llsr(void);
void __aeabi_lmul(void);
void __aeabi_ui2d(void);
void __aeabi_ui2f(void);
void __aeabi_uidiv(void);
void __aeabi_uidivmod(void);
void __aeabi_ul2d(void);
void __aeabi_ul2f(void);
void __aeabi_uldivmod(void);
void __ashldi3(void);
void __clzsi2(void);
void __divdf3(void);
void __divdi3(void);
void __divsi3(void);
void __eqdf2(void);
void __eqsf2(void);
void __extendsfdf2(void);
void __fixdfdi(void);
void __fixdfsi(void);
void __fixsfdi(void);
void __fixunsdfdi(void);
void __fixunsdfsi(void);
void __fixunssfdi(void);
void __floatdidf(void);
void __floatdisf(void);
void __floatsidf(void);
void __floatsisf(void);
void __floatundidf(void);
void __floatundisf(void);
void __floatunsidf(void);
void __floatunsisf(void);
void __gedf2(void);
void __gesf2(void);
void __gtdf2(void);
void __gtsf2(void);
void __ledf2(void);
void __lesf2(void);
void __lshrdi3(void);
void __ltdf2(void);
void __ltsf2(void);
void __moddi3(void);
void __modsi3(void);
void __muldf3(void);
void __muldi3(void);
void __mulsf3(void);
void __nedf2(void);
void __nesf2(void);
void __subdf3(void);
void __subsf3(void);
void __truncdfsf2(void);
void __udivdi3(void);
void __udivmoddi4(void);
void __udivsi3(void);
void __umoddi3(void);
void __umodsi3(void);
void __unorddf2(void);
void __unordsf2(void);
/* clang-format on */
static SymbolMap target_sym_map[] = {
@ -259,7 +259,7 @@ get_current_target(char *target_buf, uint32 target_buf_size)
#undef BUILD_TARGET_THUMB_V4T
uint32
get_plt_item_size()
get_plt_item_size(void)
{
/* 16 bytes instructions and 4 bytes symbol address */
return 20;

View File

@ -58,7 +58,7 @@ get_current_target(char *target_buf, uint32 target_buf_size)
}
static uint32
get_plt_item_size()
get_plt_item_size(void)
{
/* size of mov instruction and jmp instruction */
return 12;

View File

@ -10,44 +10,44 @@
/* clang-format off */
/* for soft-float */
void __floatsidf();
void __divdf3();
void __ltdf2();
void __floatsidf(void);
void __divdf3(void);
void __ltdf2(void);
/* for mul32 */
void __mulsi3();
void __muldi3();
void __mulsi3(void);
void __muldi3(void);
void __modsi3();
void __modsi3(void);
void __divdi3();
void __divdi3(void);
void __udivdi3();
void __unorddf2();
void __adddf3();
void __eqdf2();
void __muldf3();
void __gedf2();
void __ledf2();
void __fixunsdfsi();
void __floatunsidf();
void __subdf3();
void __nedf2();
void __fixdfsi();
void __moddi3();
void __extendsfdf2();
void __truncdfsf2();
void __gtdf2();
void __umoddi3();
void __floatdidf();
void __divsf3();
void __fixdfdi();
void __floatundidf();
void __fixsfdi();
void __fixunssfdi();
void __fixunsdfdi();
void __floatdisf();
void __floatundisf();
void __udivdi3(void);
void __unorddf2(void);
void __adddf3(void);
void __eqdf2(void);
void __muldf3(void);
void __gedf2(void);
void __ledf2(void);
void __fixunsdfsi(void);
void __floatunsidf(void);
void __subdf3(void);
void __nedf2(void);
void __fixdfsi(void);
void __moddi3(void);
void __extendsfdf2(void);
void __truncdfsf2(void);
void __gtdf2(void);
void __umoddi3(void);
void __floatdidf(void);
void __divsf3(void);
void __fixdfdi(void);
void __floatundidf(void);
void __fixsfdi(void);
void __fixunssfdi(void);
void __fixunsdfdi(void);
void __floatdisf(void);
void __floatundisf(void);
static SymbolMap target_sym_map[] = {
@ -119,7 +119,7 @@ get_current_target(char *target_buf, uint32 target_buf_size)
}
static uint32
get_plt_item_size()
get_plt_item_size(void)
{
return 0;
}

View File

@ -69,10 +69,10 @@ typedef struct JITDescriptor {
* and inline assembler statement inside.
*/
void attribute_noinline
__jit_debug_register_code();
__jit_debug_register_code(void);
void attribute_noinline
__jit_debug_register_code()
__jit_debug_register_code(void)
{
int x;
*(char *)&x = '\0';
@ -96,7 +96,7 @@ extern JITDescriptor __jit_debug_descriptor;
* This gives the debugger an easy way to inject custom code to
* handle the events.
*/
void (*__jit_debug_register_code_ptr)() = __jit_debug_register_code;
void (*__jit_debug_register_code_ptr)(void) = __jit_debug_register_code;
#ifdef __cplusplus
}
@ -171,7 +171,7 @@ DestroyJITCodeEntryInternal(JITCodeEntry *entry)
}
bool
jit_debug_engine_init()
jit_debug_engine_init(void)
{
if (jit_debug_engine) {
return true;
@ -194,7 +194,7 @@ jit_debug_engine_init()
}
void
jit_debug_engine_destroy()
jit_debug_engine_destroy(void)
{
if (jit_debug_engine) {
WASMJITEntryNode *node, *node_next;

View File

@ -11,10 +11,10 @@ extern "C" {
#endif
bool
jit_debug_engine_init();
jit_debug_engine_init(void);
void
jit_debug_engine_destroy();
jit_debug_engine_destroy(void);
bool
jit_code_entry_create(const uint8 *symfile_addr, uint64 symfile_size);

View File

@ -159,7 +159,7 @@ wasm_runtime_memory_init(mem_alloc_type_t mem_alloc_type,
}
void
wasm_runtime_memory_destroy()
wasm_runtime_memory_destroy(void)
{
if (memory_mode == MEMORY_MODE_POOL) {
#if BH_ENABLE_GC_VERIFY == 0
@ -176,7 +176,7 @@ wasm_runtime_memory_destroy()
}
unsigned
wasm_runtime_memory_pool_size()
wasm_runtime_memory_pool_size(void)
{
if (memory_mode == MEMORY_MODE_POOL)
return global_pool_size;

View File

@ -46,10 +46,10 @@ wasm_runtime_memory_init(mem_alloc_type_t mem_alloc_type,
const MemAllocOption *alloc_option);
void
wasm_runtime_memory_destroy();
wasm_runtime_memory_destroy(void);
unsigned
wasm_runtime_memory_pool_size();
wasm_runtime_memory_pool_size(void);
void
wasm_runtime_set_mem_bound_check_bytes(WASMMemoryInstance *memory,

View File

@ -469,7 +469,7 @@ wasi_context_dtor(WASMModuleInstanceCommon *inst, void *ctx)
#if WASM_ENABLE_QUICK_AOT_ENTRY != 0
static bool
quick_aot_entry_init();
quick_aot_entry_init(void);
#endif
bool
@ -1461,7 +1461,7 @@ quick_aot_entry_cmp(const void *quick_aot_entry1, const void *quick_aot_entry2)
}
static bool
quick_aot_entry_init()
quick_aot_entry_init(void)
{
qsort(quick_aot_entries, sizeof(quick_aot_entries) / sizeof(QuickAOTEntry),
sizeof(QuickAOTEntry), quick_aot_entry_cmp);

View File

@ -100,10 +100,10 @@ wasm_native_inherit_contexts(struct WASMModuleInstanceCommon *child,
#endif /* WASM_ENABLE_MODULE_INST_CONTEXT */
bool
wasm_native_init();
wasm_native_init(void);
void
wasm_native_destroy();
wasm_native_destroy(void);
#if WASM_ENABLE_QUICK_AOT_ENTRY != 0
void *

View File

@ -86,7 +86,7 @@ static bh_list registered_module_list_head;
static bh_list *const registered_module_list = &registered_module_list_head;
static korp_mutex registered_module_list_lock;
static void
wasm_runtime_destroy_registered_module_list();
wasm_runtime_destroy_registered_module_list(void);
#endif /* WASM_ENABLE_MULTI_MODULE */
#define E_TYPE_XIP 4
@ -97,11 +97,11 @@ val_type_to_val_kind(uint8 value_type);
#if WASM_ENABLE_GC == 0 && WASM_ENABLE_REF_TYPES != 0
/* Initialize externref hashmap */
static bool
wasm_externref_map_init();
wasm_externref_map_init(void);
/* Destroy externref hashmap */
static void
wasm_externref_map_destroy();
wasm_externref_map_destroy(void);
#endif /* end of WASM_ENABLE_GC == 0 && WASM_ENABLE_REF_TYPES != 0 */
static void
@ -438,7 +438,7 @@ wasm_runtime_get_exec_env_tls()
#endif /* end of OS_ENABLE_HW_BOUND_CHECK */
static bool
wasm_runtime_env_init()
wasm_runtime_env_init(void)
{
if (bh_platform_init() != 0)
return false;
@ -584,7 +584,7 @@ static korp_mutex runtime_lock = OS_THREAD_MUTEX_INITIALIZER;
static int32 runtime_ref_count = 0;
static bool
wasm_runtime_init_internal()
wasm_runtime_init_internal(void)
{
if (!wasm_runtime_memory_init(Alloc_With_System_Allocator, NULL))
return false;
@ -622,7 +622,7 @@ wasm_runtime_init()
}
static void
wasm_runtime_destroy_internal()
wasm_runtime_destroy_internal(void)
{
#if WASM_ENABLE_GC == 0 && WASM_ENABLE_REF_TYPES != 0
wasm_externref_map_destroy();
@ -4747,7 +4747,7 @@ fail:
|| defined(BUILD_TARGET_RISCV32_ILP32D) \
|| defined(BUILD_TARGET_RISCV32_ILP32F) \
|| defined(BUILD_TARGET_RISCV32_ILP32) || defined(BUILD_TARGET_ARC)
typedef void (*GenericFunctionPointer)();
typedef void (*GenericFunctionPointer)(void);
void
invokeNative(GenericFunctionPointer f, uint32 *args, uint32 n_stacks);
@ -5312,7 +5312,7 @@ fail:
#if defined(BUILD_TARGET_X86_32) || defined(BUILD_TARGET_ARM) \
|| defined(BUILD_TARGET_THUMB) || defined(BUILD_TARGET_MIPS) \
|| defined(BUILD_TARGET_XTENSA)
typedef void (*GenericFunctionPointer)();
typedef void (*GenericFunctionPointer)(void);
void
invokeNative(GenericFunctionPointer f, uint32 *args, uint32 sz);
@ -5597,7 +5597,7 @@ typedef uint32x4_t __m128i;
#endif /* end of WASM_ENABLE_SIMD != 0 */
typedef void (*GenericFunctionPointer)();
typedef void (*GenericFunctionPointer)(void);
void
invokeNative(GenericFunctionPointer f, uint64 *args, uint64 n_stacks);

View File

@ -852,10 +852,10 @@ wasm_runtime_set_module_reader(const module_reader reader,
const module_destroyer destroyer);
module_reader
wasm_runtime_get_module_reader();
wasm_runtime_get_module_reader(void);
module_destroyer
wasm_runtime_get_module_destroyer();
wasm_runtime_get_module_destroyer(void);
bool
wasm_runtime_register_module_internal(const char *module_name,
@ -881,7 +881,7 @@ bool
wasm_runtime_is_loading_module(const char *module_name);
void
wasm_runtime_destroy_loading_module_list();
wasm_runtime_destroy_loading_module_list(void);
WASMModuleCommon *
wasm_runtime_search_sub_module(const WASMModuleCommon *parent_module,
@ -1168,7 +1168,7 @@ wasm_runtime_quick_invoke_c_api_native(WASMModuleInstanceCommon *module_inst,
uint32 result_count);
void
wasm_runtime_show_app_heap_corrupted_prompt();
wasm_runtime_show_app_heap_corrupted_prompt(void);
#if WASM_ENABLE_LOAD_CUSTOM_SECTION != 0
void

View File

@ -17,10 +17,10 @@ extern "C" {
extern korp_mutex g_shared_memory_lock;
bool
wasm_shared_memory_init();
wasm_shared_memory_init(void);
void
wasm_shared_memory_destroy();
wasm_shared_memory_destroy(void);
uint16
shared_memory_inc_reference(WASMMemoryInstance *memory);

View File

@ -312,7 +312,7 @@ void
aot_destroy_comp_data(AOTCompData *comp_data);
char *
aot_get_last_error();
aot_get_last_error(void);
void
aot_set_last_error(const char *error);

View File

@ -6030,7 +6030,7 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
#if WASM_ENABLE_LABELS_AS_VALUES != 0
void **
wasm_interp_get_handle_table()
wasm_interp_get_handle_table(void)
{
WASMModuleInstance module;
memset(&module, 0, sizeof(WASMModuleInstance));

View File

@ -5751,7 +5751,7 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
#if WASM_ENABLE_FAST_INTERP != 0 && WASM_ENABLE_LABELS_AS_VALUES != 0
void **
wasm_interp_get_handle_table();
wasm_interp_get_handle_table(void);
static void **handle_table;
#endif

View File

@ -2532,7 +2532,7 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
#if WASM_ENABLE_FAST_INTERP != 0 && WASM_ENABLE_LABELS_AS_VALUES != 0
void **
wasm_interp_get_handle_table();
wasm_interp_get_handle_table(void);
static void **handle_table;
#endif

View File

@ -29,7 +29,7 @@ typedef struct {
} ThreadStartArg;
static int32
allocate_thread_id()
allocate_thread_id(void)
{
os_mutex_lock(&thread_id_lock);
int32 id = tid_allocator_get_tid(&tid_allocator);

View File

@ -64,10 +64,10 @@ void
wasm_cluster_set_max_thread_num(uint32 num);
bool
thread_manager_init();
thread_manager_init(void);
void
thread_manager_destroy();
thread_manager_destroy(void);
/* Create cluster */
WASMCluster *
@ -109,7 +109,7 @@ bool
wasm_cluster_register_destroy_callback(void (*callback)(WASMCluster *));
void
wasm_cluster_cancel_all_callbacks();
wasm_cluster_cancel_all_callbacks(void);
void
wasm_cluster_suspend_all(WASMCluster *cluster);
@ -190,7 +190,7 @@ struct WASMCurrentEnvStatus {
};
WASMCurrentEnvStatus *
wasm_cluster_create_exenv_status();
wasm_cluster_create_exenv_status(void);
void
wasm_cluster_destroy_exenv_status(WASMCurrentEnvStatus *status);

View File

@ -379,19 +379,19 @@ os_sem_unlink(const char *name);
* Initialize process-global state for os_wakeup_blocking_op.
*/
int
os_blocking_op_init();
os_blocking_op_init(void);
/**
* Start accepting os_wakeup_blocking_op requests for the calling thread.
*/
void
os_begin_blocking_op();
os_begin_blocking_op(void);
/**
* Stop accepting os_wakeup_blocking_op requests for the calling thread.
*/
void
os_end_blocking_op();
os_end_blocking_op(void);
/**
* Wake up the specified thread.
@ -1586,7 +1586,7 @@ os_closedir(os_dir_stream dir_stream);
* @return the invalid directory stream
*/
os_dir_stream
os_get_invalid_dir_stream();
os_get_invalid_dir_stream(void);
/**
* Checks whether the given directory stream is valid. An invalid directory
@ -1605,7 +1605,7 @@ os_is_dir_stream_valid(os_dir_stream *dir_stream);
* @return the invalid handle
*/
os_file_handle
os_get_invalid_handle();
os_get_invalid_handle(void);
/**
* Checks whether the given file handle is valid. An invalid handle is

View File

@ -137,7 +137,7 @@ typedef DIR *os_dir_stream;
typedef int os_raw_file_handle;
static inline os_file_handle
os_get_invalid_handle()
os_get_invalid_handle(void)
{
return -1;
}

View File

@ -28,7 +28,7 @@ typedef enum {
} libc_wasi_parse_result_t;
static void
libc_wasi_print_help()
libc_wasi_print_help(void)
{
printf(" --env=<env> Pass wasi environment variables with "
"\"key=value\"\n");

View File

@ -197,7 +197,7 @@ include(${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
# NuttX wamr lib complie required: `WAMR_SOURCES` `WAMR_CFLAGS` `WAMR_INCDIRS`
# `WAMR_DEFINITIONS`
set(WAMR_SOURCES ${WAMR_RUNTIME_LIB_SOURCE})
set(WAMR_CFLAGS -Wno-strict-prototypes -Wno-shadow -Wno-unused-variable
set(WAMR_CFLAGS -Wno-shadow -Wno-unused-variable
-Wno-int-conversion -Wno-implicit-function-declaration)
get_directory_property(WAMR_INCDIRS INCLUDE_DIRECTORIES)
get_directory_property(WAMR_DEFINITIONS COMPILE_DEFINITIONS)

View File

@ -400,7 +400,7 @@ CFLAGS += -DWASM_ENABLE_EXCE_HANDLING=0
CFLAGS += -DWASM_ENABLE_TAGS=0
endif
CFLAGS += -Wno-strict-prototypes -Wno-shadow -Wno-unused-variable
CFLAGS += -Wno-shadow -Wno-unused-variable
CFLAGS += -Wno-int-conversion -Wno-implicit-function-declaration
CFLAGS += -I${CORE_ROOT} \

View File

@ -27,7 +27,7 @@ static char **app_argv;
/* clang-format off */
static int
print_help()
print_help(void)
{
printf("Usage: iwasm [-options] wasm_file [args...]\n");
printf("options:\n");