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]
Date:   Fri, 17 Jan 2020 01:53:26 -0600
From:   Steve French <smfrench@...il.com>
To:     YueHaibing <yuehaibing@...wei.com>
Cc:     Steve French <sfrench@...ba.org>,
        Pavel Shilovskiy <pshilov@...rosoft.com>,
        Ronnie Sahlberg <lsahlber@...hat.com>,
        CIFS <linux-cifs@...r.kernel.org>,
        samba-technical <samba-technical@...ts.samba.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] cifs: remove set but not used variable 'server'

merged into cifs-2.6.git for-next

On Thu, Jan 16, 2020 at 10:01 PM YueHaibing <yuehaibing@...wei.com> wrote:
>
> fs/cifs/smb2pdu.c: In function 'SMB2_query_directory':
> fs/cifs/smb2pdu.c:4444:26: warning:
>  variable 'server' set but not used [-Wunused-but-set-variable]
>   struct TCP_Server_Info *server;
>
> It is not used, so remove it.
>
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
>  fs/cifs/smb2pdu.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
> index a23ca3d..64d5a36 100644
> --- a/fs/cifs/smb2pdu.c
> +++ b/fs/cifs/smb2pdu.c
> @@ -4441,13 +4441,10 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
>         int resp_buftype = CIFS_NO_BUFFER;
>         struct kvec rsp_iov;
>         int rc = 0;
> -       struct TCP_Server_Info *server;
>         struct cifs_ses *ses = tcon->ses;
>         int flags = 0;
>
> -       if (ses && (ses->server))
> -               server = ses->server;
> -       else
> +       if (!ses || !(ses->server))
>                 return -EIO;
>
>         if (smb3_encryption_required(tcon))
> --
> 2.7.4
>
>


-- 
Thanks,

Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ