DPDK patches and discussions
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/ethdev Bug 1745] bonding: duplicate shadow local variables
Date: Thu, 03 Jul 2025 17:15:04 +0000	[thread overview]
Message-ID: <bug-1745-3@https.bugs.dpdk.org/> (raw)

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

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

            Bug ID: 1745
           Summary: bonding: duplicate shadow local variables
           Product: DPDK
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: ethdev
          Assignee: dev@dpdk.org
          Reporter: stephen@networkplumber.org
  Target Milestone: ---

Building with -Wshadow flags several potential bugs in bonding:

[963/3418] Compiling C object
drivers/libtmp_rte_net_bond.a.p/net_bonding_rte_eth_bond_pmd.c.o
../drivers/net/bonding/rte_eth_bond_pmd.c: In function ‘member_start’:
../drivers/net/bonding/rte_eth_bond_pmd.c:1910:42: warning: declaration of
‘internals’ shadows a previous local [-Wshadow]
 1910 |                 struct bond_dev_private *internals;
      |                                          ^~~~~~~~~
../drivers/net/bonding/rte_eth_bond_pmd.c:1828:34: note: shadowed declaration
is here
 1828 |         struct bond_dev_private *internals =
bonding_eth_dev->data->dev_private;
      |                                  ^~~~~~~~~
../drivers/net/bonding/rte_eth_bond_pmd.c: In function
‘bond_ethdev_allmulticast_disable’:
../drivers/net/bonding/rte_eth_bond_pmd.c:2914:34: warning: declaration of
‘port_id’ shadows a previous local [-Wshadow]
 2914 |                         uint16_t port_id =
internals->members[i].port_id;
      |                                  ^~~~~~~
../drivers/net/bonding/rte_eth_bond_pmd.c:2903:18: note: shadowed declaration
is here
 2903 |         uint16_t port_id;
      |                  ^~~~~~~
../drivers/net/bonding/rte_eth_bond_pmd.c: In function ‘bond_ethdev_configure’:
../drivers/net/bonding/rte_eth_bond_pmd.c:4111:26: warning: declaration of ‘i’
shadows a previous local [-Wshadow]
 4111 |                 unsigned i;
      |                          ^
../drivers/net/bonding/rte_eth_bond_pmd.c:3946:18: note: shadowed declaration
is here
 3946 |         unsigned i, j;
      |

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

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

                 reply	other threads:[~2025-07-03 17:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-1745-3@https.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).