The default CONFIG_BUG=n version of BUG() should have an empty do...while
authorDavid Howells <dhowells@redhat.com>
Wed, 15 Apr 2009 18:34:56 +0000 (19:34 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 15 Apr 2009 20:55:13 +0000 (13:55 -0700)
The default CONFIG_BUG=n version of BUG() should incorporate an empty a
do...while statement to avoid compilation weirdness.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/asm-generic/bug.h

index 37b82cb..e727fe0 100644 (file)
@@ -88,7 +88,7 @@ extern void warn_slowpath(const char *file, const int line,
 
 #else /* !CONFIG_BUG */
 #ifndef HAVE_ARCH_BUG
-#define BUG()
+#define BUG() do {} while(0)
 #endif
 
 #ifndef HAVE_ARCH_BUG_ON