From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: [PATCH 2/2] net/thunderx: fix unused function nicvf_mbox_msg_str error Date: Mon, 27 Jun 2016 21:46:06 +0530 Message-ID: <1467044166-31912-2-git-send-email-jerin.jacob@caviumnetworks.com> References: <1467044166-31912-1-git-send-email-jerin.jacob@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , , Jerin Jacob To: Return-path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0076.outbound.protection.outlook.com [207.46.100.76]) by dpdk.org (Postfix) with ESMTP id D24155A30 for ; Mon, 27 Jun 2016 18:16:58 +0200 (CEST) In-Reply-To: <1467044166-31912-1-git-send-email-jerin.jacob@caviumnetworks.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fix the following error with clang error: unused function 'nicvf_mbox_msg_str' The nicvf_mbox_msg_str() maybe unused, based on DEBUG compilation option selected. Mark __attribute__((unused)) on this function, to inform compiler that this function may be unused Fixes: e93592f1 ("net/thunderx/base: add mbox APIs for PF/VF communication") Signed-off-by: Jerin Jacob Reported-by: Ferruh Yigit --- drivers/net/thunderx/base/nicvf_mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/thunderx/base/nicvf_mbox.c b/drivers/net/thunderx/base/nicvf_mbox.c index 3067331..9c5cd83 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); -- 2.5.5