lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6fbd7b38-ac0b-571f-fec6-4a807d2eaef7@schaufler-ca.com>
Date:   Mon, 16 Nov 2020 14:31:10 -0800
From:   Casey Schaufler <casey@...aufler-ca.com>
To:     Alex Shi <alex.shi@...ux.alibaba.com>
Cc:     James Morris <jmorris@...ei.org>,
        "Serge E. Hallyn" <serge@...lyn.com>,
        linux-security-module@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Casey Schaufler <casey@...aufler-ca.com>
Subject: Re: [PATCH] security/smack: remove unused varible 'rc'

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@...ux.alibaba.com>
> Cc: Casey Schaufler <casey@...aufler-ca.com> 
> Cc: James Morris <jmorris@...ei.org> 
> Cc: "Serge E. Hallyn" <serge@...lyn.com> 
> Cc: linux-security-module@...r.kernel.org 
> Cc: linux-kernel@...r.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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ