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 37b82cb96c891ffe8dc9356a7f11736aca8975ff..e727fe0d145107f48ae5699364f390e3d3298bd5 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