]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
regress: Fix test-cpp.c test tool for systems without typeof()
authorEric Bollengier <eric@baculasystems.com>
Tue, 30 Mar 2021 06:42:17 +0000 (08:42 +0200)
committerEric Bollengier <eric@baculasystems.com>
Tue, 30 Mar 2021 06:42:17 +0000 (08:42 +0200)
bacula/src/tools/test-cpp.c

index 49dfaba887b26eb07f9730f0600776b78630a96d..d46e71e2c93fa309d9106b6a67338313e9df3446 100644 (file)
 #if __cplusplus >= 201103L
 # define bdelete_and_null_auto(a) do{if(a){auto b__ = a; (a)=NULL; delete b__;}} while(0)
 #else
-# define do{ok(1, "auto not available")
+# define do{ok(1, "auto not available");} while (0)
 #endif
 
 # ifdef HAVE_TYPEOF
 #  define bdelete_and_null_typeof(a) do{if(a){typeof(a) b__ = a; (a)=NULL; delete b__;}} while(0)
 # else
-# define ok(1, "typeof not available")
+# define do{ok(1, "typeof not available");} while (0)
 #endif
 
 class obj