]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: use "do {} while (0)" for empty macro
authorArnd Bergmann <arnd@arndb.de>
Thu, 18 May 2017 13:35:54 +0000 (15:35 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 18 May 2017 14:38:49 +0000 (16:38 +0200)
commite8e5254deed0016fcca15cac05b2659736849d83
tree521677455f73b0996ce8c4890f00d1afe7a0c241
parent491109977c429bee911ed393dbc2fd647b53926d
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: d23dd7c63a6b ("ALSA: pcm: Build pcm notifier code conditionally")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm.c