From: Jerin Jacob Date: Mon, 27 Jun 2016 16:16:06 +0000 (+0530) Subject: net/thunderx: fix build with clang X-Git-Tag: spdx-start~6342 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=714b319f1168f77e551d7772a0bb7ecc99cf03cf;p=dpdk.git net/thunderx: fix build with clang Fix the following error with clang error: unused function 'nicvf_mbox_msg_str' The function nicvf_mbox_msg_str() may be unused, based on DEBUG compilation option selected. Mark __attribute__((unused)) on this function, to inform compiler that this function may be unused Fixes: 966e225c2396 ("net/thunderx/base: add mailbox for PF/VF communication") Signed-off-by: Jerin Jacob Reported-by: Ferruh Yigit --- diff --git a/drivers/net/thunderx/base/nicvf_mbox.c b/drivers/net/thunderx/base/nicvf_mbox.c index 306733112c..9c5cd834e9 100644 --- a/drivers/net/thunderx/base/nicvf_mbox.c +++ b/drivers/net/thunderx/base/nicvf_mbox.c @@ -64,7 +64,7 @@ static const char *mbox_message[NIC_MBOX_MSG_MAX] = { [NIC_MBOX_MSG_SHUTDOWN] = "NIC_MBOX_MSG_SHUTDOWN", }; -static inline const char * +static inline const char * __attribute__((unused)) nicvf_mbox_msg_str(int msg) { assert(msg >= 0 && msg < NIC_MBOX_MSG_MAX);