bug-hurd
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]