DPDK patches and discussions
 help / color / mirror / Atom feed
* [DPDK/ethdev Bug 1782] net/zxdh shadowed declarations
@ 2025-08-27 23:01 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2025-08-27 23:01 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 2677 bytes --]

https://bugs.dpdk.org/show_bug.cgi?id=1782

            Bug ID: 1782
           Summary: net/zxdh shadowed declarations
           Product: DPDK
           Version: 25.07
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: ethdev
          Assignee: dev@dpdk.org
          Reporter: stephen@networkplumber.org
  Target Milestone: ---

Compiling DPDK with -Wshadow causes additional warnings about potential issues
caused by duplicate shadow declarations. One driver with issues is net/zxdh.

[1528/3627] Compiling C object
drivers/libtmp_rte_net_zxdh.a.p/net_zxdh_zxdh_msg.c.o
In file included from ../drivers/net/zxdh/zxdh_msg.h:14,
                 from ../drivers/net/zxdh/zxdh_msg.c:17:
../drivers/net/zxdh/zxdh_msg.c: In function ‘zxdh_add_vf_mac_table’:
../drivers/net/zxdh/zxdh_common.h:94:18: warning: declaration of ‘addr’ shadows
a previous local [-Wshadow]
   94 |         uint8_t *addr = ZXDH_ADDR_OF(typ, p, fld); \
      |                  ^~~~
../drivers/net/zxdh/zxdh_msg.c:1441:17: note: in expansion of macro ‘ZXDH_SET’
 1441 |                 ZXDH_SET(mac_reply_msg, mac_reply_msg_addr, mac_flag,
ZXDH_EEXIST_MAC_FLAG);
      |                 ^~~~~~~~
../drivers/net/zxdh/zxdh_msg.c:1428:32: note: shadowed declaration is here
 1428 |         struct rte_ether_addr *addr = &mac_filter->mac;
      |                                ^~~~
../drivers/net/zxdh/zxdh_common.h:94:18: warning: declaration of ‘addr’ shadows
a previous local [-Wshadow]
   94 |         uint8_t *addr = ZXDH_ADDR_OF(typ, p, fld); \
      |                  ^~~~
../drivers/net/zxdh/zxdh_msg.c:1462:9: note: in expansion of macro ‘ZXDH_SET’
 1462 |         ZXDH_SET(msg_reply_body, reply_body, flag, ZXDH_REPS_SUCC);
      |         ^~~~~~~~
../drivers/net/zxdh/zxdh_msg.c:1428:32: note: shadowed declaration is here
 1428 |         struct rte_ether_addr *addr = &mac_filter->mac;
      |                                ^~~~
../drivers/net/zxdh/zxdh_common.h:94:18: warning: declaration of ‘addr’ shadows
a previous local [-Wshadow]
   94 |         uint8_t *addr = ZXDH_ADDR_OF(typ, p, fld); \
      |                  ^~~~
../drivers/net/zxdh/zxdh_msg.c:1468:9: note: in expansion of macro ‘ZXDH_SET’
 1468 |         ZXDH_SET(msg_reply_body, reply_body, flag, ZXDH_REPS_FAIL);
      |         ^~~~~~~~
../drivers/net/zxdh/zxdh_msg.c:1428:32: note: shadowed declaration is here
 1428 |         struct rte_ether_addr *addr =

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #2: Type: text/html, Size: 4549 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-27 23:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-27 23:01 [DPDK/ethdev Bug 1782] net/zxdh shadowed declarations bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).