* [PATCH] examples/pipeline: fix build
@ 2022-06-02 12:34 Ali Alnubani
2022-06-07 9:13 ` Dumitrescu, Cristian
0 siblings, 1 reply; 3+ messages in thread
From: Ali Alnubani @ 2022-06-02 12:34 UTC (permalink / raw)
To: dev; +Cc: cristian.dumitrescu
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")
Cc: cristian.dumitrescu@intel.com
Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
---
examples/pipeline/cli.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/pipeline/cli.c b/examples/pipeline/cli.c
index 0334616bd9..ad553f19ab 100644
--- a/examples/pipeline/cli.c
+++ b/examples/pipeline/cli.c
@@ -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) {
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] examples/pipeline: fix build
2022-06-02 12:34 [PATCH] examples/pipeline: fix build Ali Alnubani
@ 2022-06-07 9:13 ` Dumitrescu, Cristian
2022-06-07 11:13 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Dumitrescu, Cristian @ 2022-06-07 9:13 UTC (permalink / raw)
To: Ali Alnubani, dev
> -----Original Message-----
> From: Ali Alnubani <alialnu@nvidia.com>
> Sent: Thursday, June 2, 2022 1:34 PM
> To: dev@dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> 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]
> [..]
>
> Fixes: 172254555f9f ("examples/pipeline: support packet mirroring")
> Cc: cristian.dumitrescu@intel.com
>
> Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
> ---
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] examples/pipeline: fix build
2022-06-07 9:13 ` Dumitrescu, Cristian
@ 2022-06-07 11:13 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2022-06-07 11:13 UTC (permalink / raw)
To: Ali Alnubani; +Cc: dev, Dumitrescu, Cristian
> > 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")
> > Cc: cristian.dumitrescu@intel.com
> >
> > Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-07 11:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-02 12:34 [PATCH] examples/pipeline: fix build Ali Alnubani
2022-06-07 9:13 ` Dumitrescu, Cristian
2022-06-07 11:13 ` Thomas Monjalon
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).