From: Arnd Bergmann Date: Thu, 18 May 2017 13:35:54 +0000 (+0200) Subject: ALSA: pcm: use "do {} while (0)" for empty macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9aee03f39c13fc674f5973baa69d13e32b45b535;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ALSA: pcm: use "do {} while (0)" for empty macro Recent compilers produce a harmless warning for the new pcm_call_notify() macro when CONFIG_SND_PCM_OSS is disabled: sound/core/pcm.c: In function 'snd_pcm_free': sound/core/pcm.c:905:37: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] This turns the empty macro into a 'do {} while (0)' statement to avoid the warning. Fixes: 58f30d650c7f ("ALSA: pcm: Build pcm notifier code conditionally") Signed-off-by: Arnd Bergmann Signed-off-by: Takashi Iwai --- diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 24acbfb5c531..d30dba0ee688 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -894,7 +894,7 @@ static void snd_pcm_free_stream(struct snd_pcm_str * pstr) _notify->call(pcm); \ } while (0) #else -#define pcm_call_notify(pcm, call) /* NOP */ +#define pcm_call_notify(pcm, call) do {} while (0) #endif static int snd_pcm_free(struct snd_pcm *pcm)