patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 21.11] net/cnxk: fix build with optimization
@ 2022-04-13 12:05 Kevin Traynor
  0 siblings, 0 replies; only message in thread
From: Kevin Traynor @ 2022-04-13 12:05 UTC (permalink / raw)
  To: stable
  Cc: yux.jiang, daxuex.gao, Rakesh Kudurumalla, Ferruh Yigit,
	Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
	Jerin Jacob

From: Rakesh Kudurumalla <rkudurumalla@marvell.com>

[upstream commit 68f8a52a6b0ad6b77772d4564928aebb21c2ca66 ]

Fix the following build error seen with --optimization=1 and
GCC 10.3.0.

drivers/net/cnxk/cnxk_ethdev_mtr.c: In function
‘cnxk_nix_mtr_policy_validate’:
lib/ethdev/rte_mtr_driver.h:188:10: error: ‘str’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]

Bugzilla ID: 939
Bugzilla ID: 992
Fixes: b526599020ef ("net/cnxk: fix build with GCC 12")

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---
 drivers/net/cnxk/cnxk_ethdev_mtr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/cnxk/cnxk_ethdev_mtr.c b/drivers/net/cnxk/cnxk_ethdev_mtr.c
index 6d14c88e7d..b6ccccdc39 100644
--- a/drivers/net/cnxk/cnxk_ethdev_mtr.c
+++ b/drivers/net/cnxk/cnxk_ethdev_mtr.c
@@ -281,5 +281,5 @@ static int
 update_mtr_err(uint32_t act_color, struct rte_mtr_error *error, bool action)
 {
-	const char *str;
+	const char *str = NULL;
 	switch (act_color) {
 	case RTE_COLOR_GREEN:
-- 
2.34.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-13 12:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-13 12:05 [PATCH 21.11] net/cnxk: fix build with optimization Kevin Traynor

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).