From: James Morris on
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(a)gmail.com>
> Signed-off-by: David Howells <dhowells(a)redhat.com>

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

--
James Morris
<jmorris(a)namei.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/