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

Takashi Iwai tiwai at suse.de
Mon Mar 22 12:26:45 CET 2021


On Mon, 22 Mar 2021 11:31:10 +0100,
Arnd Bergmann wrote:
> 
> From: Arnd Bergmann <arnd at arndb.de>
> 
> 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 at arndb.de>

Thanks, applied.


Takashi


More information about the Alsa-devel mailing list