From 81e7997ec0b99a3085524e6a05457a45184d7636 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Mon, 15 Jul 2019 17:10:17 -0400 Subject: [PATCH] Fix: BT_ASSERT_PRE_DEV(): use `##__VA_ARGS`, not `#__VA_ARGS` `#__VA_ARGS` stringifies the arguments: that's bad. Signed-off-by: Philippe Proulx Change-Id: Ifa4c3494d3d082fd28aad72af726319f1578df2e Reviewed-on: https://review.lttng.org/c/babeltrace/+/1713 Tested-by: jenkins --- src/lib/assert-pre.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/assert-pre.h b/src/lib/assert-pre.h index 17ee8a89..942851f2 100644 --- a/src/lib/assert-pre.h +++ b/src/lib/assert-pre.h @@ -122,12 +122,12 @@ #ifdef BT_DEV_MODE /* Developer mode version of BT_ASSERT_PRE_MSG(). */ -# define BT_ASSERT_PRE_DEV_MSG(_fmt, ...) \ - BT_ASSERT_PRE_MSG(_fmt, #__VA_ARGS__) +# define BT_ASSERT_PRE_DEV_MSG(_fmt, ...) \ + BT_ASSERT_PRE_MSG(_fmt, ##__VA_ARGS__) /* Developer mode version of BT_ASSERT_PRE(). */ # define BT_ASSERT_PRE_DEV(_cond, _fmt, ...) \ - BT_ASSERT_PRE((_cond), _fmt, #__VA_ARGS__) + BT_ASSERT_PRE((_cond), _fmt, ##__VA_ARGS__) /* Developer mode version of BT_ASSERT_PRE_NON_NULL() */ # define BT_ASSERT_PRE_DEV_NON_NULL(_obj, _obj_name) \ -- 2.34.1