]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: core: avoid -Wempty-body warnings
authorArnd Bergmann <arnd@arndb.de>
Mon, 22 Mar 2021 10:31:10 +0000 (11:31 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 22 Mar 2021 11:26:00 +0000 (12:26 +0100)
commit716fa228c389b26a117ff809c2939dbe9e71f8e0
tree88d8d9e17402e37a13b3505eb495bc2ee50cb181
parentad1823d2dd3713de7b45f481a490a7d17ad0a171
ALSA: core: avoid -Wempty-body warnings

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@arndb.de>
Link: https://lore.kernel.org/r/20210322103128.547199-1-arnd@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/pcm_oss.c
sound/core/pcm_memory.c
sound/core/seq_device.c