Messages in this thread | | | Date | Fri, 23 Jul 1999 20:35:41 -0400 (EDT) | From | "Albert D. Cahalan" <> | Subject | Re: The great alpha compile warning hunt |
| |
Jeff Garzik writes: > Sean Hunter wrote:
>> I'm busy trying to track down and eliminate a stack of warnings from >> kernel compiles on Alpha. As you know, a lot of these are trivial >> warnings just caused by people making intel assumptions. >> >> 1)size_t == int >> >> This causes a lot of "int format, different argument" warnings in >> printk's. While I know that they're not that important, I'd like not >> to see these if possible. >> >> What's the normal way to fix these sorts of things? Is an explicit >> cast eg:
You cast to an unsigned int: (unsigned)sizeof(foo)
> Thankfully most of these things are printk warning issues. > > You should UPcast to a long in most cases, not downcast to an int.
This is not good. Every printk() with the problem ends up with an extra character in the format string and possibly extra overhead. For what? So you can have a 5 GB structure in kernel space?
Let's keep the multi-gigabyte data structures in userspace, if anywhere. I'd expect the compiler to choke on anything that big.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |