mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-10-19 11:28:21 +02:00
unit: fix compilation warning for test_mem_high.c
This commit is contained in:
parent
a142611f56
commit
0e62ebc038
@ -7,6 +7,7 @@
|
|||||||
#include "unicorn_test.h"
|
#include "unicorn_test.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
/* Called before every test to set up a new instance */
|
/* Called before every test to set up a new instance */
|
||||||
static int setup(void **state)
|
static int setup(void **state)
|
||||||
@ -59,7 +60,7 @@ static int number_of_memory_reads = 0;
|
|||||||
static void hook_mem64(uc_engine *uc, uc_mem_type type, uint64_t address, int size, int64_t value, void *user_data)
|
static void hook_mem64(uc_engine *uc, uc_mem_type type, uint64_t address, int size, int64_t value, void *user_data)
|
||||||
{
|
{
|
||||||
number_of_memory_reads += 1;
|
number_of_memory_reads += 1;
|
||||||
printf(">>> Memory is being accessed at 0x%lx, data size = %u\n", address, size);
|
printf(">>> Memory is being accessed at 0x%"PRIx64 ", data size = %u\n", address, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
//if a read is performed from a big address whith a non-zero last digit, multiple read events are triggered
|
//if a read is performed from a big address whith a non-zero last digit, multiple read events are triggered
|
||||||
@ -106,7 +107,7 @@ static void test_high_address_read_values(void **state)
|
|||||||
uint64_t rax = 0;
|
uint64_t rax = 0;
|
||||||
uc_assert_success(uc_reg_read(uc, UC_X86_REG_RAX, &rax));
|
uc_assert_success(uc_reg_read(uc, UC_X86_REG_RAX, &rax));
|
||||||
if(rax != 0x4242424242424242) {
|
if(rax != 0x4242424242424242) {
|
||||||
fail_msg("wrong memory read from code %lx", rax);
|
fail_msg("wrong memory read from code %"PRIx64, rax);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user