X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Flogging%2Flog.c;h=349204e8148fa24f047dc6fd0b98ff39f6017d57;hp=093930d222ff0dff47b22a6c748af5c8e30653c7;hb=cb0df5a994889ab5e3e17ec5bd96ad8ea4722002;hpb=4f79144c96b0f66d0f2913005be267060b925315 diff --git a/src/logging/log.c b/src/logging/log.c index 093930d2..349204e8 100644 --- a/src/logging/log.c +++ b/src/logging/log.c @@ -1148,9 +1148,21 @@ static void put_ctx(bt_log_message *const msg) static void put_tag(bt_log_message *const msg, const char *const tag) { _PP_MAP(_BT_LOG_MESSAGE_FORMAT_INIT, BT_LOG_MESSAGE_TAG_FORMAT) + +/* + * This generates a -Wundef warning. The issue was reported upstream: + * + * https://github.com/wonder-mice/zf_log/issues/40 + * + * but there's not much we can do here, so just silence it. + */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wundef" #if !_BT_LOG_MESSAGE_FORMAT_CONTAINS(TAG, BT_LOG_MESSAGE_TAG_FORMAT) VAR_UNUSED(tag); #endif +#pragma GCC diagnostic pop + #if !_BT_LOG_MESSAGE_FORMAT_FIELDS(BT_LOG_MESSAGE_TAG_FORMAT) VAR_UNUSED(msg); #else