[PATCH] ALSA: have snd_BUG_ON() always refer to arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The snd_BUG_ON() macro should always expand its argument even if we're
forcing it to false.  This kills off unused warnings that did not exist
before the snd_assert() -> snd_BUG_ON() conversion.

Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
---
 include/sound/core.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/sound/core.h b/include/sound/core.h
index 35424a9..87de9fc 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -387,7 +387,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
 
 #define snd_printd(fmt, args...)	/* nothing */
 #define snd_BUG()			/* nothing */
-#define snd_BUG_ON(cond)	({/*(void)(cond);*/ 0;})  /* always false */
+#define snd_BUG_ON(cond)	((cond) && 0)  /* always false */
 
 #endif /* CONFIG_SND_DEBUG */
 
-- 
1.6.0.3

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux