Skip to contentSkip to conversation

net/intel/fm10k: warning with gcc-16

DPDK/ethdev Bug 1822 In review [email protected] 3 participants 4 messages Nov 4, 2025 – Nov 5, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

http://bugs.dpdk.org/show_bug.cgi?id=1822

            Bug ID: 1822
           Summary: net/intel/fm10k: warning with gcc-16
           Product: DPDK
           Version: 25.07
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: ethdev
          Assignee: [email protected]
          Reporter: [email protected]

Target Milestone: ---

../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)

      |
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#1 lore raw

PATCH 1/1 net/fm10k: fix build with GCC 16

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")
---
 drivers/net/intel/fm10k/base/fm10k_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/intel/fm10k/base/fm10k_common.c +2 -2
index b78d4b575b..677ef87608 100644
@@ -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;
 	}
Signature · 1 line
2.48.1
Acked-by on v1 1/1
#2 lore raw

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

Quoted 36 lines · Bruce Richardson

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")
---
  drivers/net/intel/fm10k/base/fm10k_common.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/intel/fm10k/base/fm10k_common.c +2 -2
index b78d4b575b..677ef87608 100644
@@ -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;
  	}
Signature · 2 lines
Regards,
Vladimir
#3 lore raw

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

Quoted 10 lines · Vladimir
Quoted 8 lines · Bruce Richardson

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)

Quoted 8 lines
Quoted 6 lines

Bugzilla ID: 1822

Fixes 7223d200c227 ("fm10k: add base driver")
Quoted 1 line

---

Applied to dpdk-next-net-intel.

/Bruce