From: Adrien Mazarguil Date: Thu, 21 Dec 2017 12:59:59 +0000 (+0100) Subject: flow_classify: fix ISO C in exported header X-Git-Tag: spdx-start~263 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2ca53556544a2479327765fca5d9572b3dc268d6;p=dpdk.git flow_classify: fix ISO C in exported header Reported by check-includes.sh: [...]/rte_flow_classify.h:85:47: error: ISO C does not permit named variadic macros [-Werror=variadic-macros] #define RTE_FLOW_CLASSIFY_LOG(level, fmt, args...) \ ^ Fixes: be41ac2a330f ("flow_classify: introduce flow classify library") Cc: stable@dpdk.org Signed-off-by: Adrien Mazarguil Acked-by: Bernard Iremonger --- diff --git a/lib/librte_flow_classify/rte_flow_classify.h b/lib/librte_flow_classify/rte_flow_classify.h index b1016d39f3..d76c235ca3 100644 --- a/lib/librte_flow_classify/rte_flow_classify.h +++ b/lib/librte_flow_classify/rte_flow_classify.h @@ -41,6 +41,7 @@ * with rte_flow_classifier_free() */ +#include #include #include #include @@ -53,9 +54,12 @@ extern "C" { extern int librte_flow_classify_logtype; -#define RTE_FLOW_CLASSIFY_LOG(level, fmt, args...) \ -rte_log(RTE_LOG_ ## level, librte_flow_classify_logtype, "%s(): " fmt, \ - __func__, ## args) +#define RTE_FLOW_CLASSIFY_LOG(level, ...) \ + rte_log(RTE_LOG_ ## level, \ + librte_flow_classify_logtype, \ + RTE_FMT("%s(): " RTE_FMT_HEAD(__VA_ARGS__,), \ + __func__, \ + RTE_FMT_TAIL(__VA_ARGS__,))) #ifndef RTE_FLOW_CLASSIFY_TABLE_MAX #define RTE_FLOW_CLASSIFY_TABLE_MAX 32