Re: [Keyrings] [PATCH] KEYS: Use the variable 'key' inkeyctl_describe_key()

From: James Morris
Date: Mon Jun 28 2010 - 19:02:15 EST


On Mon, 28 Jun 2010, David Howells wrote:

> keyctl_describe_key() turns the key reference it gets into a usable key pointer
> and assigns that to a variable called 'key', which it then ignores in favour of
> recomputing the key pointer each time it needs it. Make it use the precomputed
> pointer instead.
>
> Without this patch, gcc 4.6 reports that the variable key is set but not used:
>
> building with gcc 4.6 I'm getting a warning message:
> CC security/keys/keyctl.o
> security/keys/keyctl.c: In function 'keyctl_describe_key':
> security/keys/keyctl.c:472:14: warning: variable 'key' set but not used
>
> Reported-by: Justin P. Mattock <justinmattock@xxxxxxxxx>
> Signed-off-by: David Howells <dhowells@xxxxxxxxxx>

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next

--
James Morris
<jmorris@xxxxxxxxx>
--
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/