Skip to contentSkip to conversation

examples/pipeline: fix build

PATCH Applied Ali Alnubani 3 participants 3 messages Jun 2, 2022 – Jun 7, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples/pipeline: fix build

This patch fixes the following build failure seen on Ubuntu 16.04 with gcc 5.4.0 because of uninitialized variable:
[..]
examples/pipeline/cli.c:2853:9: error: 'session_id' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
[..]

Fixes 172254555f9f ("examples/pipeline: support packet mirroring")
---
 examples/pipeline/cli.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/pipeline/cli.c +1 -1
index 0334616bd9..ad553f19ab 100644
@@ -2782,7 +2782,7 @@ cmd_pipeline_mirror_session(char **tokens,
 {
 	struct rte_swx_pipeline_mirroring_session_params params;
 	struct pipeline *p;
-	uint32_t session_id;
+	uint32_t session_id = 0;
 	int status;
 
 	if (n_tokens != 11) {
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines

-----Original Message-----
From: Ali Alnubani <[email protected]>
Sent: Thursday, June 2, 2022 1:34 PM
To: [email protected]
Cc: Dumitrescu, Cristian <[email protected]>
Subject: [PATCH] examples/pipeline: fix build

This patch fixes the following build failure seen on Ubuntu 16.04 with gcc 5.4.0 because of uninitialized variable:
[..]
examples/pipeline/cli.c:2853:9: error: 'session_id' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
[..]

Quoted 5 lines
Fixes 172254555f9f ("examples/pipeline: support packet mirroring")

---

#2 lore raw
Quoted 7 lines
Quoted 7 lines

This patch fixes the following build failure seen on Ubuntu 16.04 with gcc 5.4.0 because of uninitialized variable:
[..]
examples/pipeline/cli.c:2853:9: error: 'session_id' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
[..]

Quoted 6 lines
Quoted 4 lines
Fixes 172254555f9f ("examples/pipeline: support packet mirroring")

Applied, thanks.