DPDK patches and discussions
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/ethdev Bug 1746] mlx5: lotsof shadow varable warnings
Date: Thu, 03 Jul 2025 17:19:22 +0000	[thread overview]
Message-ID: <bug-1746-3@https.bugs.dpdk.org/> (raw)

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

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

            Bug ID: 1746
           Summary: mlx5: lotsof shadow varable warnings
           Product: DPDK
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: minor
          Priority: Normal
         Component: ethdev
          Assignee: dev@dpdk.org
          Reporter: stephen@networkplumber.org
  Target Milestone: ---

Building with -Wshadow reports several potential issues with mlx5 driver.

[1123/3418] Compiling C object
drivers/libtmp_rte_net_mlx5.a.p/net_mlx5_mlx5_rss.c.o
In file included from ../drivers/net/mlx5/mlx5_rss.c:19:
../drivers/net/mlx5/mlx5_rx.h: In function ‘mprq_buf_replace’:
../drivers/net/mlx5/mlx5_rx.h:448:39: warning: declaration of ‘rep’ shadows a
previous local [-Wshadow]
  448 |                 struct mlx5_mprq_buf *rep;
      |                                       ^~~
../drivers/net/mlx5/mlx5_rx.h:424:31: note: shadowed declaration is here
  424 |         struct mlx5_mprq_buf *rep = rxq->mprq_repl;
      |                               ^~~
[1124/3418] Compiling C object
drivers/libtmp_rte_net_mlx5.a.p/net_mlx5_mlx5_ethdev.c.o
In file included from ../drivers/net/mlx5/mlx5_ethdev.c:26:
../drivers/net/mlx5/mlx5_rx.h: In function ‘mprq_buf_replace’:
../drivers/net/mlx5/mlx5_rx.h:448:39: warning: declaration of ‘rep’ shadows a
previous local [-Wshadow]
  448 |                 struct mlx5_mprq_buf *rep;
      |                                       ^~~
../drivers/net/mlx5/mlx5_rx.h:424:31: note: shadowed declaration is here
  424 |         struct mlx5_mprq_buf *rep = rxq->mprq_repl;
      |                               ^~~
In file included from ../lib/eal/include/dev_driver.h:8,
                 from ../lib/ethdev/ethdev_driver.h:19,
                 from ../drivers/net/mlx5/mlx5_ethdev.c:13:
../drivers/net/mlx5/mlx5_tx.h: In function ‘mlx5_tx_burst_empw_inline’:
../lib/eal/include/rte_common.h:817:28: warning: declaration of ‘_a’ shadows a
previous local [-Wshadow]
  817 |                 typeof (a) _a = (a); \
      |                            ^~
../lib/eal/include/rte_common.h:798:25: note: in definition of macro ‘RTE_MIN’
  798 |                 typeof (b) _b = (b); \
      |                         ^
../drivers/net/mlx5/mlx5_tx.h:2971:40: note: in expansion of macro ‘RTE_MAX’
 2971 |                                        RTE_MAX(txq->inlen_empw +
      |                                        ^~~~~~~
../lib/eal/include/rte_common.h:797:28: note: shadowed declaration is here
  797 |                 typeof (a) _a = (a); \
      |                            ^~
../drivers/net/mlx5/mlx5_tx.h:2970:32: note: in expansion of macro ‘RTE_MIN’
 2970 |                         room = RTE_MIN(room,
      |                                ^~~~~~~
../lib/eal/include/rte_common.h:817:28: warning: declaration of ‘_a’ shadows a
previous local [-Wshadow]
  817 |                 typeof (a) _a = (a); \
      |                            ^~
../lib/eal/include/rte_common.h:798:34: note: in definition of macro ‘RTE_MIN’
  798 |                 typeof (b) _b = (b); \
      |                                  ^
../drivers/net/mlx5/mlx5_tx.h:2971:40: note: in expansion of macro ‘RTE_MAX’
 2971 |                                        RTE_MAX(txq->inlen_empw +
      |                                        ^~~~~~~
../lib/eal/include/rte_common.h:797:28: note: shadowed declaration is here
  797 |                 typeof (a) _a = (a); \
      |                            ^~
../drivers/net/mlx5/mlx5_tx.h:2970:32: note: in expansion of macro ‘RTE_MIN’
 2970 |                         room = RTE_MIN(room,
      |                                ^~~~~~~
../lib/eal/include/rte_common.h:818:28: warning: declaration of ‘_b’ shadows a
previous local [-Wshadow]
  818 |                 typeof (b) _b = (b); \
      |                            ^~
../lib/eal/include/rte_common.h:798:34: note: in definition of macro ‘RTE_MIN’
  798 |                 typeof (b) _b = (b); \
      |                                  ^
../drivers/net/mlx5/mlx5_tx.h:2971:40: note: in expansion of macro ‘RTE_MAX’
 2971 |                                        RTE_MAX(txq->inlen_empw +
      |                                        ^~~~~~~
../lib/eal/include/rte_common.h:798:28: note: shadowed declaration is here
  798 |                 typeof (b) _b = (b); \
      |                            ^~
../drivers/net/mlx5/mlx5_tx.h:2970:32: note: in expansion of macro ‘RTE_MIN’
 2970 |                         room = RTE_MIN(room,
      |                                ^~~~~~~

...
Truncated because bugzilla can't take all of it.

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

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

                 reply	other threads:[~2025-07-03 17:19 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-1746-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).