From: Philippe Proulx Date: Mon, 15 Jul 2019 21:10:17 +0000 (-0400) Subject: Fix: BT_ASSERT_PRE_DEV(): use `##__VA_ARGS`, not `#__VA_ARGS` X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=81e7997ec0b99a3085524e6a05457a45184d7636;hp=ce95fb2680f08176955eb7cf2fd7cd7b6ad2fbfd;p=babeltrace.git 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 --- 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) \