From: Andrew Cooper Date: Wed, 10 Feb 2016 13:48:36 +0000 (+0100) Subject: xen/lib.h: fix ASSERT() to build with clang X-Git-Tag: 4.7.0-rc1~613 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=70cbc38d774af77b6a05ffb2d8fb7e0a38025378;p=people%2Fandrewcoop%2Fxen.git xen/lib.h: fix ASSERT() to build with clang Clang warns about a semicolon immediately following an if() clause as a possible mistake, and recommends putting the semicolon on a new line if it was intentional. A newline is not an option here, so use a set of empty braces instead. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index 4258912ed9..1c652bb8c6 100644 --- a/xen/include/xen/lib.h +++ b/xen/include/xen/lib.h @@ -32,7 +32,7 @@ #define ASSERT_UNREACHABLE() assert_failed("unreachable") #define debug_build() 1 #else -#define ASSERT(p) do { if ( 0 && (p) ); } while (0) +#define ASSERT(p) do { if ( 0 && (p) ) {} } while (0) #define ASSERT_UNREACHABLE() do { } while (0) #define debug_build() 0 #endif