Skip to content

Commit 1629750

Browse files
committed
fix format specifier warning on 32bit builds
1 parent b8dde72 commit 1629750

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/iwasm/aot/aot_perf_map.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44
*/
55

6+
#include <inttypes.h>
7+
68
#include "aot_perf_map.h"
79
#include "bh_log.h"
810
#include "bh_platform.h"
@@ -89,12 +91,12 @@ aot_create_perf_map(const AOTModule *module, char *error_buf,
8991
for (i = 0; i < module->func_count; i++) {
9092
memset(perf_map_info, 0, 128);
9193
if (strlen(module_name) > 0)
92-
snprintf(perf_map_info, 128, "%lx %x [%s]#aot_func#%u\n",
94+
snprintf(perf_map_info, 128, PRIuPTR " %x [%s]#aot_func#%u\n",
9395
(uintptr_t)sorted_func_ptrs[i].ptr,
9496
get_func_size(module, sorted_func_ptrs, i), module_name,
9597
sorted_func_ptrs[i].idx);
9698
else
97-
snprintf(perf_map_info, 128, "%lx %x aot_func#%u\n",
99+
snprintf(perf_map_info, 128, PRIuPTR " %x aot_func#%u\n",
98100
(uintptr_t)sorted_func_ptrs[i].ptr,
99101
get_func_size(module, sorted_func_ptrs, i),
100102
sorted_func_ptrs[i].idx);

0 commit comments

Comments
 (0)