From d917d7b351362857e898028f8ae09ebb36064313 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 21 Jun 2022 21:46:00 -0600 Subject: [PATCH] fix actual x_assert macro definition --- libs/pbd/pbd/assert.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libs/pbd/pbd/assert.h b/libs/pbd/pbd/assert.h index 21b1f622fe..74890638a3 100644 --- a/libs/pbd/pbd/assert.h +++ b/libs/pbd/pbd/assert.h @@ -30,11 +30,10 @@ x_assert (foo, foo == 0); */ -#define x_assert(VAR, EXPR) \ -# ifndef NDEBUG \ -assert (EXPR); \ -# else \ -(void) (VAR) \ +# ifndef NDEBUG +#define x_assert(VAR, EXPR) assert (EXPR) +# else +#define x_assert(VAR, EXPR) (void) (VAR) # endif #endif /* __libpbd_assert_h__ */