Netdev List
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Zhen Lei <thunder.leizhen@huawei.com>
Cc: Karsten Keil <isdn@linux-pingi.de>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH 1/1] mISDN: Mark local variable 'incomplete' as __maybe_unused in dsp_pipeline_build()
Date: Wed, 19 May 2021 18:45:46 +0300	[thread overview]
Message-ID: <YKUyqhva+2UQ44Ly@unreal> (raw)
In-Reply-To: <20210519125352.7991-1-thunder.leizhen@huawei.com>

On Wed, May 19, 2021 at 08:53:52PM +0800, Zhen Lei wrote:
> GCC reports the following warning with W=1:
> 
> drivers/isdn/mISDN/dsp_pipeline.c:221:6: warning:
>  variable 'incomplete' set but not used [-Wunused-but-set-variable]
>   221 |  int incomplete = 0, found = 0;
>       |      ^~~~~~~~~~
> 
> This variable is used only when macro PIPELINE_DEBUG is defined.

That define is commented 13 years ago and can be seen as a dead code
that should be removed.

Thanks

> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  drivers/isdn/mISDN/dsp_pipeline.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/isdn/mISDN/dsp_pipeline.c b/drivers/isdn/mISDN/dsp_pipeline.c
> index 40588692cec7..6a31f6879da8 100644
> --- a/drivers/isdn/mISDN/dsp_pipeline.c
> +++ b/drivers/isdn/mISDN/dsp_pipeline.c
> @@ -218,7 +218,7 @@ void dsp_pipeline_destroy(struct dsp_pipeline *pipeline)
>  
>  int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg)
>  {
> -	int incomplete = 0, found = 0;
> +	int __maybe_unused incomplete = 0, found = 0;
>  	char *dup, *tok, *name, *args;
>  	struct dsp_element_entry *entry, *n;
>  	struct dsp_pipeline_entry *pipeline_entry;
> -- 
> 2.25.1
> 
> 

  reply	other threads:[~2021-05-19 15:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 12:53 [PATCH 1/1] mISDN: Mark local variable 'incomplete' as __maybe_unused in dsp_pipeline_build() Zhen Lei
2021-05-19 15:45 ` Leon Romanovsky [this message]
2021-05-20  1:09   ` Leizhen (ThunderTown)
2021-05-20  1:24     ` Leizhen (ThunderTown)

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=YKUyqhva+2UQ44Ly@unreal \
    --to=leon@kernel.org \
    --cc=isdn@linux-pingi.de \
    --cc=netdev@vger.kernel.org \
    --cc=thunder.leizhen@huawei.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