From 6f0a01293d4c49ebfc0fd441b466dd4f5452c702 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Sun, 17 Jan 2016 10:06:00 +0800 Subject: [PATCH] unit: fix some compilation warnings in test_tb_x86.c --- tests/unit/test_tb_x86.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/unit/test_tb_x86.c b/tests/unit/test_tb_x86.c index ce5eb75e..7b51d71a 100644 --- a/tests/unit/test_tb_x86.c +++ b/tests/unit/test_tb_x86.c @@ -8,6 +8,7 @@ #include #include #include +#include // Demostration of a self-modifying "IMUL eax,mem,Ib" opcode @@ -110,7 +111,7 @@ static void hook_code32(uc_engine *uc, uint32_t tmp4[1]; uint32_t ecx; - printf("\nhook_code32: Address: %lx, Opcode Size: %d\n", address, size); + printf("\nhook_code32: Address: %"PRIx64", Opcode Size: %d\n", address, size); size = MIN(sizeof(tmp), size); if (!uc_mem_read(uc, address, tmp, size)) { @@ -202,7 +203,7 @@ static void hook_mem32(uc_engine *uc, ctype = '?'; if (type == 16) ctype = 'R'; if (type == 17) ctype = 'W'; - printf("hook_mem32(%c): Address: 0x%lx, Size: %d, Value:0x%lx\n", ctype, address, size, value); + printf("hook_mem32(%c): Address: 0x%"PRIx64", Size: %d, Value:0x%"PRIx64"\n", ctype, address, size, value); // if (!uc_mem_read(uc, 0x6000003a, tmp, 4)) // {