Re: [PATCH -mm] Introduce U16_MAX and U32_MAX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jul 31 2007 11:57, Andrew Morton wrote:
>> --- a/include/linux/kernel.h
>> +++ b/include/linux/kernel.h
>> @@ -30,6 +30,9 @@ extern const char linux_proc_banner[];
>>  #define LLONG_MIN	(-LLONG_MAX - 1)
>>  #define ULLONG_MAX	(~0ULL)
>>  
>> +#define U16_MAX		((u16) ~0U)
>> +#define U32_MAX		((u32) ~0U)
>> +
>
>hm, I'd have thought that there's a risk of gcc warnings here, forcing
>0xffffffff into a u16, but apparently not.

No, since it is casted (= explicitly truncated).


	Jan
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux