[dpdk-dev] [PATCH 2/2] net/thunderx: fix unused function nicvf_mbox_msg_str error

Jerin Jacob jerin.jacob at caviumnetworks.com
Mon Jun 27 18:16:06 CEST 2016


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 <jerin.jacob at caviumnetworks.com>
Reported-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 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



More information about the dev mailing list