From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/ethdev Bug 1810] net/mlx: possible misuse of comma operator
Date: Thu, 23 Oct 2025 23:47:01 +0000 [thread overview]
Message-ID: <bug-1810-3@http.bugs.dpdk.org/> (raw)
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@dpdk.org
Reporter: stephen@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.
next reply other threads:[~2025-10-23 23:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 23:47 bugzilla [this message]
2025-11-04 6:52 ` [DPDK/ethdev Bug 1810] net/mlx: possible misuse of comma operator bugzilla
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-1810-3@http.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.