Re: [PATCH] new ioctl type checking causes gcc warning

From: Andreas Schwab
Date: Fri Sep 12 2003 - 15:05:22 EST


"Kevin P. Fleming" <kpfleming@xxxxxxx> writes:

> --- linux-2.6.0-test5/include/asm-i386/ioctl.h~ Mon Sep 8 12:49:52 2003
> +++ linux-2.6.0-test5/include/asm-i386/ioctl.h Fri Sep 12 11:58:41 2003
> @@ -53,7 +53,7 @@
> ((size) << _IOC_SIZESHIFT))
>
> /* provoke compile error for invalid uses of size argument */
> -extern int __invalid_size_argument_for_IOC;
> +extern unsigned int __invalid_size_argument_for_IOC;

Why not make it size_t which is what sizeof actually returns?

Andreas.

--
Andreas Schwab, SuSE Labs, schwab@xxxxxxx
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
-
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/