Re: [patch] u64 casts

From: Albert Cahalan
Date: Fri Feb 27 2004 - 20:16:24 EST


On Fri, 2004-02-27 at 19:45, David Mosberger wrote:
> >>>>> On 27 Feb 2004 17:16:53 -0500, Albert Cahalan <albert@xxxxxxxxxxxxxxxxxxxxx> said:
>
> Albert> Supposing that this is the case, you may get warnings.
>
> Well, then do it on your own kernel/system. I'm not interested in
> spending time on this now, so please don't touch ia64 unless you
> verified that all the other pieces are in place.

Remember, that is only if all of:

1. glibc improperly uses raw kernel headers
2. usage is in such a way that warnings happen
3. you rebuild glibc with these kernel headers

If this is really the case, the warnings may be
eliminated by running a 1-line sed script over
the headers as they are imported into glibc.
It's something like this: s/__u64/u_int64_t/

In return, you can have type-safety w/o warnings
during the kernel build.

In my example, suppose that foo is a pointer
to u64. You'd like to print the u64. If by
mistake you use the pointer itself, you won't
be getting a warning. The cast hides it.


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