From: Takashi Iwai <tiwai@suse.de>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
Takashi Iwai <tiwai@suse.com>
Subject: Re: [PATCH] ALSA: pcm: avoid nused-but-set-variable warning
Date: Wed, 16 Nov 2022 12:42:29 +0100 [thread overview]
Message-ID: <87h6yznn16.wl-tiwai@suse.de> (raw)
In-Reply-To: <874juzg3kd.wl-kuninori.morimoto.gx@renesas.com>
On Wed, 16 Nov 2022 01:12:39 +0100,
Kuninori Morimoto wrote:
>
>
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> It will indicate below warning if W=1 was added and CONFIG_SND_DEBUG
> was not set. This patch adds __maybe_unused and avoid it.
>
> ${LINUX}/sound/core/pcm_native.c: In function 'constrain_mask_params':
> ${LINUX}/sound/core/pcm_native.c:291:25: error: variable 'old_mask' set but not used [-Werror=unused-but-set-variable]
> 291 | struct snd_mask old_mask;
> | ^~~~~~~~
> ${LINUX}/sound/core/pcm_native.c: In function 'constrain_interval_params':
> ${LINUX}/sound/core/pcm_native.c:327:29: error: variable 'old_interval' set but not used [-Werror=unused-but-set-variable]
> 327 | struct snd_interval old_interval;
> | ^~~~~~~~~~~~
> ${LINUX}/sound/core/pcm_native.c: In function 'constrain_params_by_rules':
> ${LINUX}/sound/core/pcm_native.c:368:29: error: variable 'old_interval' set but not used [-Werror=unused-but-set-variable]
> 368 | struct snd_interval old_interval;
> | ^~~~~~~~~~~~
> ${LINUX}/sound/core/pcm_native.c:367:25: error: variable 'old_mask' set but not used [-Werror=unused-but-set-variable]
> 367 | struct snd_mask old_mask;
> | ^~~~~~~~
> ${LINUX}/sound/core/pcm_native.c: In function 'snd_pcm_hw_params_choose':
> ${LINUX}/sound/core/pcm_native.c:652:29: error: variable 'old_interval' set but not used [-Werror=unused-but-set-variable]
> 652 | struct snd_interval old_interval;
> | ^~~~~~~~~~~~
> ${LINUX}/sound/core/pcm_native.c:651:25: error: variable 'old_mask' set but not used [-Werror=unused-but-set-variable]
> 651 | struct snd_mask old_mask;
> | ^~~~~~~~
> cc1: all warnings being treated as errors
> make[3]: *** [${LINUX}/scripts/Makefile.build:250: sound/core/pcm_native.o] error 1
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thanks, applied now.
Takashi
prev parent reply other threads:[~2022-11-16 11:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 0:12 [PATCH] ALSA: pcm: avoid nused-but-set-variable warning Kuninori Morimoto
2022-11-16 5:24 ` Takashi Sakamoto
2022-11-16 11:42 ` Takashi Iwai [this message]
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=87h6yznn16.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=tiwai@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.