Thu, Dec 12, 2019 at 07:22:21AM CET, liuhangbin(a)gmail.com wrote:
With gcc 8.3 I got the following build error:
In file included from teamd_dbus.c:33:
teamd_dbus.c: In function 'teamd_dbus_init':
teamd.h:54:2: error: expected expression before 'if'
if (val <= ctx->debug) \
^~
teamd.h:57:37: note: in expansion of macro 'teamd_log_dbgx'
#define teamd_log_dbg(ctx, args...) teamd_log_dbgx(ctx, 1, ##args)
^~~~~~~~~~~~~~
teamd_dbus.c:507:2: note: in expansion of macro 'teamd_log_dbg'
teamd_log_dbg(ctx, "dbus: connected to %s with name %s", id,
^~~~~~~~~~~~~
Fix it by adding parentheses and braces around the content.
Fixes: f32310b9a5cc ("libteam: wapper teamd_log_dbg with teamd_log_dbgx")
Signed-off-by: Hangbin Liu <liuhangbin(a)gmail.com>
applied, thanks.