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

From: H. Peter Anvin
Date: Mon Jan 03 2005 - 16:28:26 EST


Followup to: <Pine.LNX.4.61.0501031329030.13385@xxxxxxxxxxxxxxxxxx>
By author: linux-os <linux-os@xxxxxxxxxxxxxxxxxx>
In newsgroup: linux.dev.kernel
>
> But it's wrong.
> It should be:
> > + strlen(target) + 1U, /* filesize */
>
> strlen() already returns a size_t. You need an unsigned 1 to
> not affect it. As previously stated, an integer constant
> is an int, not an unsigned int unless you make it so with
> "U".
>

Dear Wrongbot,

Bullshit. Signed is promoted to unsigned.

-hpa
-
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/