logging: ignore -Wundef in log.c
When building with -Wundef enabled, I get this warning:
/home/smarchi/src/babeltrace/src/logging/log.c: In function ‘put_tag’:
/home/smarchi/src/babeltrace/src/logging/log.c:455:15: error: "_BT_LOG_MESSAGE_FORMAT_MASK__TAG" is not defined, evaluates to 0 [-Werror=undef]
_PP_CONCAT_3(_BT_LOG_MESSAGE_FORMAT_MASK_, _, field)
^
/home/smarchi/src/babeltrace/src/logging/log.c:350:30: note: in definition of macro ‘_PP_PASTE_3’
#define _PP_PASTE_3(a, b, c) a ## b ## c
^
/home/smarchi/src/babeltrace/src/logging/log.c:455:2: note: in expansion of macro ‘_PP_CONCAT_3’
_PP_CONCAT_3(_BT_LOG_MESSAGE_FORMAT_MASK_, _, field)
^~~~~~~~~~~~
/home/smarchi/src/babeltrace/src/logging/log.c:470:3: note: in expansion of macro ‘_BT_LOG_MESSAGE_FORMAT_MASK’
(_BT_LOG_MESSAGE_FORMAT_MASK(field) & _BT_LOG_MESSAGE_FORMAT_FIELDS(format))
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/smarchi/src/babeltrace/src/logging/log.c:1151:6: note: in expansion of macro ‘_BT_LOG_MESSAGE_FORMAT_CONTAINS’
#if !_BT_LOG_MESSAGE_FORMAT_CONTAINS(TAG, BT_LOG_MESSAGE_TAG_FORMAT)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
That code comes from zf_log and is a big mess of macros, I don't know
how to fix that. However, I'd like to enable -Wundef, given that it has
found a relatively important bug (see commit
9103e903a8 "Fix: define
macros for logging levels"). So, silence -Wundef just for that
particular spot.
Change-Id: I42fece6a04c3715daea873683c350b2987c500e5
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2278
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>