alsa: fix snd_BUG_on() and friends
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 6 Nov 2008 20:05:21 +0000 (12:05 -0800)
committerTakashi Iwai <tiwai@suse.de>
Fri, 7 Nov 2008 00:31:51 +0000 (01:31 +0100)
sound/pci/pcxhr/pcxhr_core.c: In function 'pcxhr_set_pipe_cmd_params':
sound/pci/pcxhr/pcxhr_core.c:700: warning: statement with no effect
sound/pci/pcxhr/pcxhr_core.c:706: warning: statement with no effect
sound/pci/pcxhr/pcxhr_core.c:710: warning: statement with no effect

Due to

try to fix this, and be more conventional about the empty stubs.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/core.h

index e5eec5f7350213c8fda3d6f76c3f0a725c22b1e0..7e558947268134a81ff5ad597d6baf29f4b88e6f 100644 (file)
@@ -388,9 +388,13 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
 
 #else /* !CONFIG_SND_DEBUG */
 
-#define snd_printd(fmt, args...)       /* nothing */
-#define snd_BUG()                      /* nothing */
-#define snd_BUG_ON(cond)       ({/*(void)(cond);*/ 0;})  /* always false */
+#define snd_printd(fmt, args...)       do { } while (0)
+#define snd_BUG()                      do { } while (0)
+static inline int __snd_bug_on(void)
+{
+       return 0;
+}
+#define snd_BUG_ON(cond)               __snd_bug_on()  /* always false */
 
 #endif /* CONFIG_SND_DEBUG */