Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH] creds: suppress warning in get_cred | Date | Mon, 19 Jan 2009 20:19:00 +0000 |
| |
Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> We do have uintptr_t inside the kernel (it is typedeffed to unsigned > long) but I used it explicitly because its type is defined to be large > enough to store any pointer.
I believe that within the kernel, unsigned long is guaranteed to be the same size as a pointer; so much code will break if this is not true.
> However, I have also verified that using a newer compiler (4.3.2 in my > case) makes the warning go away as Hannes Eder pointed out when > mentioning his earlier patch. > > So, your choice.
I don't mind you putting the cast in, but I'd prefer the cast to be via unsigned long, and I think it should have a comment to indicate why the extra cast is necessary.
David
| |