Re: [PATCH] creds: suppress warning in get_cred

From: Stephen Rothwell
Date: Mon Jan 19 2009 - 09:55:42 EST


Hi David,

On Mon, 19 Jan 2009 12:29:31 +0000 David Howells <dhowells@xxxxxxxxxx> wrote:
>
> Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>
> > + return get_new_cred((struct cred *)(uintptr_t)cred);
>
> That should probably be 'unsigned long' within the kernel. This is also a
> compiler bug, but I think we can live with this fix.

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.

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.
--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/

Attachment: pgp00000.pgp
Description: PGP signature