Re: [3/8] kill gen_init_cpio.c printk() of size_t warning

From: William Lee Irwin III
Date: Mon Jan 03 2005 - 18:05:18 EST


On Mon, Jan 03, 2005 at 01:36:27PM -0800, William Lee Irwin III wrote:
>> I'm not sure who you're responding to here, but gcc emitted an actual
>> warning and I was only attempting to carry out the minimal effort
>> necessary to silence it. I'm not really interested in creating or
>> being involved with controversy, just silencing the core build in the
>> least invasive and so on way possible, leaving deeper drivers/ issues
>> to the resolution of the true underlying problems.
>> I don't have anything to do with the code excerpt above; I merely
>> followed the style of the other unsigned integer coercions in the file.

On Mon, Jan 03, 2005 at 09:55:03PM +0000, Al Viro wrote:
> Egads... Just use %zd for size_t. It's going to have rank no less than
> that of int, so you'll get 1 converted to size_t and size_t as type of
> result.

My personal preference was to do that, but it would have been
inconsistent with the approach used in the rest of the file.


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