1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

changed casting from intmax to uintmax

Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
This commit is contained in:
Pascal Bauer 2022-12-08 13:01:20 +01:00 committed by Niklas Eiling
parent 65a9a85456
commit 6a8acc467b

View file

@ -75,14 +75,14 @@ int main(int argc, char **argv) {
PRINT_ERROR;
printf("%s opened.\n", filename);
printf("Target offset is %#jx, page size is %lu\n", (intmax_t) target, sysconf(_SC_PAGE_SIZE));
printf("Target offset is %#jx, page size is %lu\n", (uintmax_t) target, sysconf(_SC_PAGE_SIZE));
fflush(stdout);
// Map one page
printf("mmap(%d, %lu, %#x, %#x, %d, %#jx)\n", 0,
MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED,
fd, (intmax_t) target);
fd, (uintmax_t) target);
map_base = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, target & ~MAP_MASK);
@ -109,7 +109,7 @@ int main(int argc, char **argv) {
exit(2);
}
printf("Value at offset %#jx (%p): %#x\n", (intmax_t) target, virt_addr, read_result);
printf("Value at offset %#jx (%p): %#x\n", (uintmax_t) target, virt_addr, read_result);
fflush(stdout);
if (argc > 4) {