From 4687a5fffa8bf611294dac3854a882c37b21f9ab Mon Sep 17 00:00:00 2001 From: Milos Nikic Date: Tue, 24 Jun 2025 00:58:44 +0100 Subject: i386 kern: fix overflow in vm_object_print_part call The call to vm_object_print_part was passing 0ULL and ~0ULL for offset and size, respectively. These values are 64-bit (unsigned long long), which causes compiler warnings when building for 32-bit platforms where vm_offset_t and vm_size_t are typedefs of uintptr_t (i.e., unsigned int). This patch replaces those constants with 0 and UINTPTR_MAX, which match the expected types and avoid implicit conversion or overflow warnings. No functional change. Message-ID: <20250623235844.763-1-nikic.milos@gmail.com> --- vm/vm_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vm/vm_object.c') diff --git a/vm/vm_object.c b/vm/vm_object.c index 2dba76b1..c7714a44 100644 --- a/vm/vm_object.c +++ b/vm/vm_object.c @@ -35,6 +35,7 @@ #include #include +#include #include #include @@ -3050,7 +3051,7 @@ void vm_object_print_part( void vm_object_print( vm_object_t object) { - vm_object_print_part(object, 0ULL, ~0ULL); + vm_object_print_part(object, 0, UINTPTR_MAX); } #endif /* MACH_KDB */ -- cgit v1.2.3