[PATCH] net/fm10k: fix build with GCC 16

Bruce Richardson bruce.richardson at intel.com
Tue Nov 4 12:15:15 CET 2025


Build error reported with GCC 16, due to a set but unused variable. Fix
the issue by removing the setting of the var and marking it as unused.

../drivers/net/intel/fm10k/base/fm10k_common.c: In function 'fm10k_unbind_hw_stats_q':
../drivers/net/intel/fm10k/base/fm10k_common.c:480:62: warning:
parameter 'idx' set but not used [-Wunused-but-set-parameter=]
  480 | void fm10k_unbind_hw_stats_q(struct fm10k_hw_stats_q *q, u32 idx, u32 count)

Bugzilla ID: 1822
Fixes: 7223d200c227 ("fm10k: add base driver")
Cc: stable at dpdk.org
Cc: stephen at networkplumber.org

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/intel/fm10k/base/fm10k_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/intel/fm10k/base/fm10k_common.c b/drivers/net/intel/fm10k/base/fm10k_common.c
index b78d4b575b..677ef87608 100644
--- a/drivers/net/intel/fm10k/base/fm10k_common.c
+++ b/drivers/net/intel/fm10k/base/fm10k_common.c
@@ -477,11 +477,11 @@ void fm10k_update_hw_stats_q(struct fm10k_hw *hw, struct fm10k_hw_stats_q *q,
  *  Function invalidates the index values for the queues so any updates that
  *  may have happened are ignored and the base for the queue stats is reset.
  **/
-void fm10k_unbind_hw_stats_q(struct fm10k_hw_stats_q *q, u32 idx, u32 count)
+void fm10k_unbind_hw_stats_q(struct fm10k_hw_stats_q *q, u32 idx __rte_unused, u32 count)
 {
 	u32 i;
 
-	for (i = 0; i < count; i++, idx++, q++) {
+	for (i = 0; i < count; i++, q++) {
 		q->rx_stats_idx = 0;
 		q->tx_stats_idx = 0;
 	}
-- 
2.48.1



More information about the stable mailing list