From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH 1/8] xen/lib: Fix ASSERT() to build with clang Date: Tue, 9 Feb 2016 20:01:41 +0000 Message-ID: <1455048108-5045-2-git-send-email-andrew.cooper3@citrix.com> References: <1455048108-5045-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1455048108-5045-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Tim Deegan , Ian Campbell , Jan Beulich List-Id: xen-devel@lists.xenproject.org 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 --- CC: Jan Beulich CC: Tim Deegan CC: Ian Campbell --- xen/include/xen/lib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h index 4258912..76232b2 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 -- 2.1.4