[DPDK/ethdev Bug 1746] mlx5: lotsof shadow varable warnings
bugzilla at dpdk.org
bugzilla at dpdk.org
Thu Jul 3 19:19:22 CEST 2025
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 at dpdk.org
Reporter: stephen at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20250703/a3e72b1e/attachment.htm>
More information about the dev
mailing list