mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-11 09:25:20 +00:00
Clear compilation warning and dead code (#3002)
This commit is contained in:
parent
63012f0222
commit
23d2e0627c
|
@ -25,6 +25,7 @@
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
#if WASM_ENABLE_LOAD_CUSTOM_SECTION != 0
|
||||
static bool
|
||||
check_utf8_str(const uint8 *str, uint32 len)
|
||||
{
|
||||
|
@ -89,6 +90,7 @@ check_utf8_str(const uint8 *str, uint32 len)
|
|||
}
|
||||
return (p == p_end);
|
||||
}
|
||||
#endif /* end of WASM_ENABLE_LOAD_CUSTOM_SECTION != 0 */
|
||||
|
||||
/* Internal function in object file */
|
||||
typedef struct AOTObjectFunc {
|
||||
|
@ -1111,6 +1113,7 @@ static union {
|
|||
EMIT_BUF(s, str_len); \
|
||||
} while (0)
|
||||
|
||||
#if WASM_ENABLE_LOAD_CUSTOM_SECTION != 0
|
||||
static bool
|
||||
read_leb(uint8 **p_buf, const uint8 *buf_end, uint32 maxbits, bool sign,
|
||||
uint64 *p_result)
|
||||
|
@ -1309,6 +1312,7 @@ get_name_section_size(AOTCompData *comp_data)
|
|||
fail:
|
||||
return 0;
|
||||
}
|
||||
#endif /* end of WASM_ENABLE_LOAD_CUSTOM_SECTION != 0 */
|
||||
|
||||
static uint32
|
||||
get_custom_sections_size(AOTCompContext *comp_ctx, AOTCompData *comp_data)
|
||||
|
@ -2065,6 +2069,7 @@ aot_emit_native_symbol(uint8 *buf, uint8 *buf_end, uint32 *p_offset,
|
|||
return true;
|
||||
}
|
||||
|
||||
#if WASM_ENABLE_LOAD_CUSTOM_SECTION != 0
|
||||
static bool
|
||||
aot_emit_name_section(uint8 *buf, uint8 *buf_end, uint32 *p_offset,
|
||||
AOTCompData *comp_data, AOTCompContext *comp_ctx)
|
||||
|
@ -2090,6 +2095,7 @@ aot_emit_name_section(uint8 *buf, uint8 *buf_end, uint32 *p_offset,
|
|||
LOG_DEBUG("emit name section");
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool
|
||||
aot_emit_custom_sections(uint8 *buf, uint8 *buf_end, uint32 *p_offset,
|
||||
|
|
|
@ -4046,15 +4046,6 @@ check_wasi_abi_compatibility(const WASMModule *module,
|
|||
* according to the assumption, they should be all wasi compatiable
|
||||
*/
|
||||
|
||||
/* always can not have both at the same time */
|
||||
if (start && initialize) {
|
||||
set_error_buf(
|
||||
error_buf, error_buf_size,
|
||||
"neither a command nor a reactor can both have _start function "
|
||||
"and _initialize function at the same time");
|
||||
return false;
|
||||
}
|
||||
|
||||
#if WASM_ENABLE_MULTI_MODULE != 0
|
||||
/* filter out commands (with `_start`) cases */
|
||||
if (start && !main_module) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user