Re: [PATCH] ALSA: core: avoid -Wempty-body warnings

From: Takashi Iwai
Date: Mon Mar 22 2021 - 07:27:25 EST


On Mon, 22 Mar 2021 11:31:10 +0100,
Arnd Bergmann wrote:
>
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> Building with 'make W=1' shows some warnings about empty function-style
> macros:
>
> sound/core/pcm_memory.c: In function 'preallocate_pages':
> sound/core/pcm_memory.c:236:49: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
> 236 | preallocate_info_init(substream);
>
> sound/core/seq_device.c: In function 'snd_seq_device_dev_register':
> sound/core/seq_device.c:163:41: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
> 163 | queue_autoload_drivers();
>
> Change them to empty inline functions, which are more robust here.
>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Thanks, applied.


Takashi