summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-11 23:59:19 +0800
committerruki <[email protected]>2025-12-12 09:00:45 +0800
commit890c032d88364e69baa41050079e9b69b58fa735 (patch)
treeb53b78a9a316cf3600af4678c14f1915c9d85824 /core/src
parenta60216f7bf32ab77d83a3b8bfc228f9ddbf08764 (diff)
fix compile error
Diffstat (limited to 'core/src')
-rw-r--r--core/src/xmake/binutils/ar/readsyms.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/xmake/binutils/ar/readsyms.c b/core/src/xmake/binutils/ar/readsyms.c
index 2aeed2512..a95d7ed48 100644
--- a/core/src/xmake/binutils/ar/readsyms.c
+++ b/core/src/xmake/binutils/ar/readsyms.c
@@ -487,7 +487,10 @@ tb_bool_t xm_binutils_ar_read_symbols(tb_stream_ref_t istream, tb_hize_t base_of
// we fall back to using the symbols parsed from the archive symbol table.
// Although the type information is less accurate (defaulting to "T"),
// it guarantees that symbols are not lost.
- lua_pushinteger(lua, member_header_pos);
+ //
+ // cast to lua_Integer to avoid warning C4244 on 32-bit MSVC
+ // member_header_pos is tb_hize_t (64-bit), but AR offsets are usually 32-bit
+ lua_pushinteger(lua, (lua_Integer)member_header_pos);
lua_rawget(lua, map_idx);
if (!lua_isnil(lua, -1)) {
read_ok = tb_true;