All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org
Subject: Re: [alsa-devel] [PATCH 1/2] ALSA: HDA: patch_realtek: fix empty macro usage in if block
Date: Sun, 12 Jan 2020 09:43:53 +0100	[thread overview]
Message-ID: <s5h1rs5kqt2.wl-tiwai@suse.de> (raw)
In-Reply-To: <20200111214736.3002-2-pierre-louis.bossart@linux.intel.com>

On Sat, 11 Jan 2020 22:47:35 +0100,
Pierre-Louis Bossart wrote:
> 
> GCC reports the following warning with W=1
> 
> sound/pci/hda/patch_realtek.c: In function ‘alc269_suspend’:
> sound/pci/hda/patch_realtek.c:3616:29: warning: suggest braces around
> empty body in an ‘if’ statement [-Wempty-body]
>  3616 |   alc5505_dsp_suspend(codec);
>       |                             ^
> 
> sound/pci/hda/patch_realtek.c: In function ‘alc269_resume’:
> sound/pci/hda/patch_realtek.c:3651:28: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
>  3651 |   alc5505_dsp_resume(codec);
>       |                            ^
> 
> This is a classic macro problem and can indeed lead to bad program
> flows.
> 
> Fix by using the usual "do { } while (0)" pattern
> 
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

Thanks, applied now.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2020-01-12  8:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-11 21:47 [alsa-devel] [PATCH 0/2] ALSA: fix compiler warnings Pierre-Louis Bossart
2020-01-11 21:47 ` [alsa-devel] [PATCH 1/2] ALSA: HDA: patch_realtek: fix empty macro usage in if block Pierre-Louis Bossart
2020-01-12  8:43   ` Takashi Iwai [this message]
2020-01-11 21:47 ` [alsa-devel] [PATCH 2/2] ALSA: usb: update old-style static const declaration Pierre-Louis Bossart
2020-01-12  8:44   ` Takashi Iwai

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=s5h1rs5kqt2.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=pierre-louis.bossart@linux.intel.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.