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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 2 May 2023 17:27:09 +0200
From:   Simon Horman <simon.horman@...igine.com>
To:     Dominique Martinet <asmadeus@...ewreck.org>
Cc:     Eric Van Hensbergen <ericvh@...il.com>,
        Latchesar Ionkov <lucho@...kov.net>,
        Christian Schoenebeck <linux_oss@...debyte.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, v9fs@...ts.linux.dev,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 4/5] 9p: virtio: skip incrementing unused variable

On Thu, Apr 27, 2023 at 08:23:37PM +0900, Dominique Martinet wrote:
> Fix the following scan-build warning:
> net/9p/trans_virtio.c:504:3: warning: Value stored to 'in' is never read [deadcode.DeadStores]
>                 in += pack_sg_list_p(chan->sg, out + in, VIRTQUEUE_NUM,
>                 ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> I'm honestly not 100% sure about this one; I'm tempted to think we
> could (should?) just check the return value of pack_sg_list_p to skip
> the in_sgs++ and setting sgs[] if it didn't process anything, but I'm
> not sure it should ever happen so this is probably fine as is.
> 
> Just removing the assignment at least makes it clear the return value
> isn't used, so it's an improvement in terms of readability.
> 
> Signed-off-by: Dominique Martinet <asmadeus@...ewreck.org>

Reviewed-by: Simon Horman <simon.horman@...igine.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ