[PATCH 4/5] The default CONFIG_BUG=n version of BUG() should have anempty do...while

From: David Howells
Date: Wed Apr 15 2009 - 14:36:39 EST


The default CONFIG_BUG=n version of BUG() must incorporate an empty a
do...while statement to avoid compilation weirdness.

Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
---

include/asm-generic/bug.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 37b82cb..e727fe0 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/