From: Casey Schaufler <casey@schaufler-ca.com>
To: Alex Shi <alex.shi@linux.alibaba.com>
Cc: James Morris <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org,
Casey Schaufler <casey@schaufler-ca.com>
Subject: Re: [PATCH] security/smack: remove unused varible 'rc'
Date: Mon, 16 Nov 2020 14:31:10 -0800 [thread overview]
Message-ID: <6fbd7b38-ac0b-571f-fec6-4a807d2eaef7@schaufler-ca.com> (raw)
In-Reply-To: <1604817942-3755-1-git-send-email-alex.shi@linux.alibaba.com>
On 11/7/2020 10:45 PM, Alex Shi wrote:
> This varible isn't used and can be removed to avoid a gcc warning:
> security/smack/smack_lsm.c:3873:6: warning: variable ‘rc’ set but not
> used [-Wunused-but-set-variable]
>
> Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
> Cc: Casey Schaufler <casey@schaufler-ca.com>
> Cc: James Morris <jmorris@namei.org>
> Cc: "Serge E. Hallyn" <serge@hallyn.com>
> Cc: linux-security-module@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
I will take this through the Smack tree. Thank you.
> ---
> security/smack/smack_lsm.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
> index 5c90b9fa4d40..9994fcfafd70 100644
> --- a/security/smack/smack_lsm.c
> +++ b/security/smack/smack_lsm.c
> @@ -3870,7 +3870,6 @@ static struct smack_known *smack_from_netlbl(struct sock *sk, u16 family,
> struct netlbl_lsm_secattr secattr;
> struct socket_smack *ssp = NULL;
> struct smack_known *skp = NULL;
> - int rc;
>
> netlbl_secattr_init(&secattr);
>
> @@ -3880,7 +3879,7 @@ static struct smack_known *smack_from_netlbl(struct sock *sk, u16 family,
> if (netlbl_skbuff_getattr(skb, family, &secattr) == 0) {
> skp = smack_from_secattr(&secattr, ssp);
> if (secattr.flags & NETLBL_SECATTR_CACHEABLE)
> - rc = netlbl_cache_add(skb, family, &skp->smk_netlabel);
> + netlbl_cache_add(skb, family, &skp->smk_netlabel);
> }
>
> netlbl_secattr_destroy(&secattr);
prev parent reply other threads:[~2020-11-16 22:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-08 6:45 Alex Shi
2020-11-16 22:31 ` Casey Schaufler [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6fbd7b38-ac0b-571f-fec6-4a807d2eaef7@schaufler-ca.com \
--to=casey@schaufler-ca.com \
--cc=alex.shi@linux.alibaba.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=serge@hallyn.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®