From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jeffrey.b.shaw@intel.com>
Received: from mga01.intel.com (mga01.intel.com [192.55.52.88])
 by dpdk.org (Postfix) with ESMTP id C4136B4D5
 for <dev@dpdk.org>; Wed, 18 Feb 2015 19:08:09 +0100 (CET)
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by fmsmga101.fm.intel.com with ESMTP; 18 Feb 2015 10:07:42 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.09,603,1418112000"; d="scan'208";a="687494571"
Received: from plxs0284.pdx.intel.com ([10.25.97.128])
 by orsmga002.jf.intel.com with ESMTP; 18 Feb 2015 10:07:43 -0800
Received: from plxv1143.pdx.intel.com (plxv1143.pdx.intel.com [10.25.98.50])
 by plxs0284.pdx.intel.com with ESMTP id t1II7gQH029241;
 Wed, 18 Feb 2015 10:07:42 -0800
Received: from plxv1143.pdx.intel.com (localhost [127.0.0.1])
 by plxv1143.pdx.intel.com with ESMTP id t1II7gxb002578;
 Wed, 18 Feb 2015 10:07:42 -0800
Received: (from jbshaw@localhost)
	by plxv1143.pdx.intel.com with œ id t1II7g2i002568;
	Wed, 18 Feb 2015 10:07:42 -0800
X-Authentication-Warning: plxv1143.pdx.intel.com: jbshaw set sender to
 jeffrey.b.shaw@intel.com using -f
From: Jeff Shaw <jeffrey.b.shaw@intel.com>
To: dev@dpdk.org
Date: Wed, 18 Feb 2015 10:07:40 -0800
Message-Id: <1424282860-1517-1-git-send-email-jeffrey.b.shaw@intel.com>
X-Mailer: git-send-email 1.7.0.7
Subject: [dpdk-dev] [PATCH] fm10k: fix clang unused function error
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Feb 2015 18:08:10 -0000

This commit fixes the following error which was reported when
compiling with clang by moving the function inside an
RTE_LIBRTE_FM10K_DEBUG_RX ifdef block.

error: unused function 'dump_rxd'

Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
---
 lib/librte_pmd_fm10k/fm10k_rxtx.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_rxtx.c b/lib/librte_pmd_fm10k/fm10k_rxtx.c
index f6768f0..83bddfc 100644
--- a/lib/librte_pmd_fm10k/fm10k_rxtx.c
+++ b/lib/librte_pmd_fm10k/fm10k_rxtx.c
@@ -41,11 +41,9 @@
 #define rte_packet_prefetch(p)  do {} while (0)
 #endif
 
+#ifdef RTE_LIBRTE_FM10K_DEBUG_RX
 static inline void dump_rxd(union fm10k_rx_desc *rxd)
 {
-#ifndef RTE_LIBRTE_FM10K_DEBUG_RX
-	RTE_SET_USED(rxd);
-#endif
 	PMD_RX_LOG(DEBUG, "+----------------|----------------+");
 	PMD_RX_LOG(DEBUG, "|     GLORT      | PKT HDR & TYPE |");
 	PMD_RX_LOG(DEBUG, "|   0x%08x   |   0x%08x   |", rxd->d.glort,
@@ -62,6 +60,7 @@ static inline void dump_rxd(union fm10k_rx_desc *rxd)
 	PMD_RX_LOG(DEBUG, "|       0x%016lx        |", rxd->q.timestamp);
 	PMD_RX_LOG(DEBUG, "+----------------|----------------+");
 }
+#endif
 
 static inline void
 rx_desc_to_ol_flags(struct rte_mbuf *m, const union fm10k_rx_desc *d)
-- 
2.1.0