[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 7/8] vm/vm_resident.c (vm_page_print): remove unnecessary cas
From: |
Ivan Shmakov |
Subject: |
Re: [PATCH 7/8] vm/vm_resident.c (vm_page_print): remove unnecessary casts |
Date: |
Wed, 11 Dec 2013 20:54:56 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
>>>>> Marin Ramesa <mpr@hi.t-com.hr> writes:
>>>>> On 11.12.2013 19:12:33, Ivan Shmakov wrote:
>> Even though I’m unsure how vm_offset_t is defined (is it int? or is
>> it ptrdiff_t? ¹), I’d rather like to see casts to /int/ here, as
>> it’s what %X (usually – no idea about vm/*) implies.
>> ¹ Please note that while int is 32 bits on both i386 and amd64, the
>> size of ptrdiff_t varies between the two.
> It’s unsigned long.
Usually, ‘long’ requires %lX, not %X (‘int’.) These are both
32-bit on i386, but %lX is 64-bit on amd64 (as is ‘long’ there.)
AIUI, kern/printf.c /ignores/ ‘l’ in %lX right now, so adding
one there should have no effect, and cause no harm. However,
should one be changing GNU Mach towards proper 64-bit support,
this change would be required anyway.
--
FSF associate member #7257
- Re: [PATCH 4/8] Quiet GCC warnings about set but unused variables, (continued)
[PATCH 3/8] Cleanup of the copyin() and copyout() calls, Marin Ramesa, 2013/12/11
[PATCH 5/8] include/mach/mach4.defs (memory_object_create_proxy): fix passing from incompatible pointer type, Marin Ramesa, 2013/12/11
[PATCH 6/8] vm/vm_kern.c (kmem_submap): remove unnecessary cast, Marin Ramesa, 2013/12/11
[PATCH 7/8] vm/vm_resident.c (vm_page_print): remove unnecessary casts, Marin Ramesa, 2013/12/11
[PATCH 8/8] mig/server.c (WriteVarDecls): quiet GCC warning about set but unused variable, Marin Ramesa, 2013/12/11