Clear compilation warning and dead code (#3002)
This commit is contained in:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user