[alsa-devel] [PATCH] Fix logical-not-parentheses warning

Takashi Iwai tiwai at suse.de
Sun Aug 2 09:10:17 CEST 2015


On Sun, 02 Aug 2015 07:43:22 +0200,
Tomer Barletz wrote:
> 
> Signed-off-by: Tomer Barletz <barletz at gmail.com>

This is rather a gcc5 problem that doesn't recognize the expression
correctly.  Though, this change make things worse, so I'm willing to
take it.  But please give the warning message itself in changelog
to show exactly what is the issue.  The subject doesn't enough to
understand why this change is needed.


thanks,

Takashi

> ---
>  sound/pci/oxygen/oxygen_mixer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c
> index 6492bca..4ca1266 100644
> --- a/sound/pci/oxygen/oxygen_mixer.c
> +++ b/sound/pci/oxygen/oxygen_mixer.c
> @@ -88,7 +88,7 @@ static int dac_mute_put(struct snd_kcontrol *ctl,
>  	int changed;
>  
>  	mutex_lock(&chip->mutex);
> -	changed = !value->value.integer.value[0] != chip->dac_mute;
> +	changed = (!value->value.integer.value[0]) != chip->dac_mute;
>  	if (changed) {
>  		chip->dac_mute = !value->value.integer.value[0];
>  		chip->model.update_dac_mute(chip);
> -- 
> 2.4.3
> 
> 


More information about the Alsa-devel mailing list