Skip to content

Commit

Permalink
Appease GCC -Wstrict-prototypes warning
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Sep 9, 2024
1 parent 5fff523 commit 40efbf1
Show file tree
Hide file tree
Showing 16 changed files with 69 additions and 69 deletions.
2 changes: 1 addition & 1 deletion core/iwasm/aot/aot_reloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion core/iwasm/aot/aot_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,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);
Expand Down
74 changes: 37 additions & 37 deletions core/iwasm/aot/arch/aot_reloc_xtensa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 __modsi3();

void __divdi3();

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 __mulsi3(void);
void __muldi3(void);

void __modsi3(void);

void __divdi3(void);

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[] = {
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions core/iwasm/common/wasm_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions core/iwasm/common/wasm_memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions core/iwasm/common/wasm_native.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down
14 changes: 7 additions & 7 deletions core/iwasm/common/wasm_runtime_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -5312,7 +5312,7 @@ wasm_runtime_invoke_native(WASMExecEnv *exec_env, void *func_ptr,
#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);

Expand Down
2 changes: 1 addition & 1 deletion core/iwasm/common/wasm_runtime_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions core/iwasm/common/wasm_shared_memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion core/iwasm/compilation/aot.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions core/iwasm/libraries/thread-mgr/thread_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions core/shared/platform/include/platform_api_extension.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/shared/platform/nuttx/platform_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion product-mini/platforms/common/libc_wasi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion product-mini/platforms/posix/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 40efbf1

Please sign in to comment.