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: <s5h1r92130a.wl-tiwai@suse.de>
Date:   Wed, 16 Jun 2021 13:07:49 +0200
From:   Takashi Iwai <tiwai@...e.de>
To:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Cc:     perex@...ex.cz, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ALSA: oss: Remove redundant assignment to src_access

On Tue, 15 Jun 2021 12:53:43 +0200,
Jiapeng Chong wrote:
> 
> Variable src_access is set to 'dst_access', but this value is never read
> as it is not used later on, hence it is a redundant assignment and can
> be removed.
> 
> Clean up the following clang-analyzer warning:
> 
> sound/core/oss/pcm_plugin.c:472:4: warning: Value stored to 'src_access'
> is never read [clang-analyzer-deadcode.DeadStores].

That's true, but OTOH, this is better to kept for synchronization with
other parts where all set the same src_access.  So I'd keep it as is.
The compiler will optimize out, after all.


thanks,

Takashi

> 
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> ---
>  sound/core/oss/pcm_plugin.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c
> index 061ba06..a7c0e50 100644
> --- a/sound/core/oss/pcm_plugin.c
> +++ b/sound/core/oss/pcm_plugin.c
> @@ -469,7 +469,6 @@ int snd_pcm_plug_format_plugins(struct snd_pcm_substream *plug,
>  				return err;
>  			}
>  			srcformat = tmpformat;
> -			src_access = dst_access;
>  		}
>  		tmpformat.rate = dstformat.rate;
>          	err = snd_pcm_plugin_build_rate(plug,
> -- 
> 1.8.3.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ