DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ali Alnubani <alialnu@nvidia.com>
To: <dev@dpdk.org>
Cc: <cristian.dumitrescu@intel.com>
Subject: [PATCH] examples/pipeline: fix build
Date: Thu, 2 Jun 2022 15:34:12 +0300	[thread overview]
Message-ID: <20220602123412.3271817-1-alialnu@nvidia.com> (raw)

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


             reply	other threads:[~2022-06-02 12:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02 12:34 Ali Alnubani [this message]
2022-06-07  9:13 ` Dumitrescu, Cristian
2022-06-07 11:13   ` Thomas Monjalon

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=20220602123412.3271817-1-alialnu@nvidia.com \
    --to=alialnu@nvidia.com \
    --cc=cristian.dumitrescu@intel.com \
    --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 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).