Messages in this thread |  | | | Date | Fri, 12 Sep 2003 16:43:34 -0700 | | From | "Kevin P. Fleming" <> | | Subject | Re: [PATCH] new ioctl type checking causes gcc warning |
| |
Arnd Bergmann wrote:
> I had tried that first, but found that there are places that > use asm/ioctl.h without including asm/posix_types.h first, so > size_t might not be declared. unsigned int (or unsigned long) > is the better alternative here. Does this look ok to everyone?
After working on this some more this afternoon, I realize now that it's much better to have the typechecking in place than not, even for userspace. Maybe the best solution is to still leave the typechecking (don't wrap it in #ifdef __KERNEL__), and just
#ifdef size_t extern size_t __invalid_size_argument_for_IOC; #else extern unsigned int __invalid_size_argument_for_IOC; #endif
Would the type specification of this non-existent variable ever actually effect the generated code? If not, then even putting this #ifdef in is overkill.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |