[DPDK/ethdev Bug 1810] net/mlx: possible misuse of comma operator
bugzilla at dpdk.org
bugzilla at dpdk.org
Fri Oct 24 01:47:01 CEST 2025
http://bugs.dpdk.org/show_bug.cgi?id=1810
Bug ID: 1810
Summary: net/mlx: possible misuse of comma operator
Product: DPDK
Version: 20.11
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: dev at dpdk.org
Reporter: stephen at networkplumber.org
Target Milestone: ---
If DPDK is built with clang and -Wcomma is enabled for drivers then both mlx4
and mlx5 have comma where semicolon should be used.
[1175/3622] Compiling C object
drivers/libtmp_rte_net_mlx4.a.p/net_mlx4_mlx4_rxtx.c.o
../drivers/net/mlx4/mlx4_rxtx.c:641:46: warning: possible misuse of comma
operator here [-Wcomma]
641 | pv[(*pv_counter)++].val = *(uint32_t *)from,
| ^
../drivers/net/mlx4/mlx4_rxtx.c:641:3: note: cast expression to void to silence
warning
641 | pv[(*pv_counter)++].val = *(uint32_t *)from,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| (void)( )
1 warning generated.
[1189/3622] Compiling C object
drivers/libtmp_rte_net_mlx5.a.p/net_mlx5_mlx5_nta_split.c.o
../drivers/net/mlx5/mlx5_nta_split.c:348:53: warning: possible misuse of comma
operator here [-Wcomma]
348 | actions[1].type = RTE_FLOW_ACTION_TYPE_MODIFY_FIELD,
| ^
../drivers/net/mlx5/mlx5_nta_split.c:348:2: note: cast expression to void to
silence warning
348 | actions[1].type = RTE_FLOW_ACTION_TYPE_MODIFY_FIELD,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| (void)( )
../drivers/net/mlx5/mlx5_nta_split.c:349:28: warning: possible misuse of comma
operator here [-Wcomma]
349 | actions[1].conf = &rx_meta,
| ^
../drivers/net/mlx5/mlx5_nta_split.c:349:2: note: cast expression to void to
silence warning
349 | actions[1].conf = &rx_meta,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| (void)( )
2 warnings generated.
[1200/3622] Compiling C object
drivers/libtmp_rte_net_mlx5.a.p/net_mlx5_linux_mlx5_verbs.c.o
../drivers/net/mlx5/linux/mlx5_verbs.c:886:38: warning: possible misuse of
comma operator here [-Wcomma]
886 | qp_attr.qp_type = IBV_QPT_RAW_PACKET,
| ^
../drivers/net/mlx5/linux/mlx5_verbs.c:886:2: note: cast expression to void to
silence warning
886 | qp_attr.qp_type = IBV_QPT_RAW_PACKET,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| (void)( )
1 warning generated.
[1207/3622] Compiling C object
drivers/libtmp_rte_net_mlx5.a.p/net_mlx5_linux_mlx5_os.c.o
../drivers/net/mlx5/linux/mlx5_os.c:434:37: warning: possible misuse of comma
operator here [-Wcomma]
434 | dv_attr.type = IBV_FLOW_ATTR_NORMAL,
| ^
../drivers/net/mlx5/linux/mlx5_os.c:434:2: note: cast expression to void to
silence warning
434 | dv_attr.type = IBV_FLOW_ATTR_NORMAL,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| (void)( )
../drivers/net/mlx5/linux/mlx5_os.c:435:44: warning: possible misuse of comma
operator here [-Wcomma]
435 | dv_attr.match_mask = (void *)&matcher_mask,
| ^
../drivers/net/mlx5/linux/mlx5_os.c:435:2: note: cast expression to void to
silence warning
435 | dv_attr.match_mask = (void *)&matcher_mask,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| (void)( )
2 warnings generated.
[1224/3622] Compiling C object
drivers/libtmp_rte_net_mlx5.a.p/net_mlx5_mlx5_flow.c.o
../drivers/net/mlx5/mlx5_flow.c:11135:55: warning: possible misuse of comma
operator here [-Wcomma]
11135 | ctx->action_rss.func = RTE_ETH_HASH_FUNCTION_DEFAULT,
| ^
../drivers/net/mlx5/mlx5_flow.c:11135:3: note: cast expression to void to
silence warning
11135 | ctx->action_rss.func = RTE_ETH_HASH_FUNCTION_DEFAULT,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| (void)( )
../drivers/net/mlx5/mlx5_flow.c:11136:28: warning: possible misuse of comma
operator here [-Wcomma]
11136 | ctx->action_rss.level = 0,
| ^
../drivers/net/mlx5/mlx5_flow.c:11136:3: note: cast expression to void to
silence warning
11136 | ctx->action_rss.level = 0,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| (void)( )
../drivers/net/mlx5/mlx5_flow.c:11137:48: warning: possible misuse of comma
operator here [-Wcomma]
11137 | ctx->action_rss.types = priv->rss_conf.rss_hf,
| ^
../drivers/net/mlx5/mlx5_flow.c:11137:3: note: cast expression to void to
silence warning
11137 | ctx->action_rss.types = priv->rss_conf.rss_hf,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| (void)( )
../drivers/net/mlx5/mlx5_flow.c:11138:55: warning: possible misuse of comma
operator here [-Wcomma]
11138 | ctx->action_rss.key_len = priv->rss_conf.rss_key_len,
| ^
../drivers/net/mlx5/mlx5_flow.c:11138:3: note: cast expression to void to
silence warning
11138 | ctx->action_rss.key_len = priv->rss_conf.rss_key_len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| (void)( )
../drivers/net/mlx5/mlx5_flow.c:11139:47: warning: possible misuse of comma
operator here [-Wcomma]
11139 | ctx->action_rss.queue_num = priv->reta_idx_n,
| ^
../drivers/net/mlx5/mlx5_flow.c:11139:3: note: cast expression to void to
silence warning
11139 | ctx->action_rss.queue_num = priv->reta_idx_n,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| (void)( )
../drivers/net/mlx5/mlx5_flow.c:11140:47: warning: possible misuse of comma
operator here [-Wcomma]
11140 | ctx->action_rss.key = priv->rss_conf.rss_key,
| ^
../drivers/net/mlx5/mlx5_flow.c:11140:3: note: cast expression to void to
silence warning
11140 | ctx->action_rss.key = priv->rss_conf.rss_key,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| (void)( )
6 warnings generated.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the dev
mailing list