diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2022-12-06 00:33:41 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-12-06 21:27:53 +0100 |
commit | c925ed9fd3bf4d4fb8a3e6306cda19040cd54627 (patch) | |
tree | bb974414bebe35c7dfa24e0396425d1fd5f3d19a /vm | |
parent | 2a7263559572f178322451a6a1e0a43dc90cdb32 (diff) | |
download | gnumach-c925ed9fd3bf4d4fb8a3e6306cda19040cd54627.tar.gz gnumach-c925ed9fd3bf4d4fb8a3e6306cda19040cd54627.tar.bz2 gnumach-c925ed9fd3bf4d4fb8a3e6306cda19040cd54627.zip |
Define vm_size_t and vm_offset_t as __mach_uintptr_t.
This allows *printf to use %zd/%zu/%zx to print vm_size_t and
vm_offset_t. Warnings using the incorrect specifiers were fixed.
Note that MACH_PORT_NULL became just 0 because GCC thinks that we were
comparing a pointer to a character (due to it being an unsigned int) so
I removed the explicit cast.
Message-Id: <Y47UNdcUF35Ag4Vw@reue>
Diffstat (limited to 'vm')
-rw-r--r-- | vm/vm_fault.c | 2 | ||||
-rw-r--r-- | vm/vm_map.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/vm/vm_fault.c b/vm/vm_fault.c index df7b2c41..e1dfb06e 100644 --- a/vm/vm_fault.c +++ b/vm/vm_fault.c @@ -652,7 +652,7 @@ vm_fault_return_t vm_fault_page( m->offset + object->paging_offset, PAGE_SIZE, access_required)) != KERN_SUCCESS) { if (object->pager && rc != MACH_SEND_INTERRUPTED) - printf("%s(0x%p, 0x%p, 0x%lx, 0x%x, 0x%x) failed, %x\n", + printf("%s(0x%p, 0x%p, 0x%zx, 0x%x, 0x%x) failed, %x\n", "memory_object_data_request", object->pager, object->pager_request, diff --git a/vm/vm_map.c b/vm/vm_map.c index 0dec1f20..ceeb91ee 100644 --- a/vm/vm_map.c +++ b/vm/vm_map.c @@ -694,7 +694,7 @@ vm_map_find_entry_anywhere(struct vm_map *map, if (himask + max != 0) { /* high bits do not continue up to the end */ - printf("invalid mask %lx\n", mask); + printf("invalid mask %zx\n", mask); return NULL; } @@ -737,7 +737,7 @@ restart: max_size = size + mask; if (max_size < size) { - printf("max_size %lx got smaller than size %lx with mask %lx\n", + printf("max_size %zd got smaller than size %zd with mask %zd\n", max_size, size, mask); goto error; } @@ -773,7 +773,7 @@ restart: assert(end <= (entry->vme_end + entry->gap_size)); if (end > max) { /* Does not respect the allowed maximum */ - printf("%lx does not respect %lx\n", end, max); + printf("%zx does not respect %zx\n", end, max); return NULL; } *startp = start; @@ -939,7 +939,7 @@ vm_map_pmap_enter( if (vm_map_pmap_enter_print) { printf("vm_map_pmap_enter:"); - printf("map: %p, addr: %lx, object: %p, offset: %lx\n", + printf("map: %p, addr: %zx, object: %p, offset: %zx\n", map, addr, object, offset); } |