DPDK patches and discussions
 help / color / mirror / Atom feed
From: <jerinj@marvell.com>
To: <dev@dpdk.org>,
	Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
	Jasvinder Singh <jasvinder.singh@intel.com>
Cc: <thomas@monjalon.net>, <david.marchand@redhat.com>,
	<ferruh.yigit@xilinx.com>, <stephen@networkplumber.org>,
	Jerin Jacob <jerinj@marvell.com>, <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH v1] examples/ip_pipeline: fix build issue with GCC 13
Date: Tue, 2 May 2023 19:20:44 +0530	[thread overview]
Message-ID: <20230502135045.3541570-1-jerinj@marvell.com> (raw)

From: Jerin Jacob <jerinj@marvell.com>

Fix the following build issue by initializing req to NULL for
the local variable.

In function 'thread_msg_handle', inlined from 'thread_main' at
../examples/ip_pipeline/thread.c:3130:6:
../examples/ip_pipeline/thread.c:535:20: warning: 'req' may be used
uninitialized [-Wmaybe-uninitialized]
  535 |                 if (req == NULL)
      |                    ^
../examples/ip_pipeline/thread.c: In function 'thread_main':
../examples/ip_pipeline/thread.c:433:32: note: 'req' was declared here
  433 |         struct thread_msg_req *req;

Bugzilla ID: 1220
Fixes: a8bd581de397 ("examples/ip_pipeline: add thread runtime")
Cc: stable@dpdk.org

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
---
 examples/ip_pipeline/thread.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c
index 82d5f87c38..9817657ca9 100644
--- a/examples/ip_pipeline/thread.c
+++ b/examples/ip_pipeline/thread.c
@@ -430,7 +430,7 @@ thread_pipeline_disable(uint32_t thread_id,
 static inline struct thread_msg_req *
 thread_msg_recv(struct rte_ring *msgq_req)
 {
-	struct thread_msg_req *req;
+	struct thread_msg_req *req = NULL;
 
 	int status = rte_ring_sc_dequeue(msgq_req, (void **) &req);
 
-- 
2.40.1


             reply	other threads:[~2023-05-02 13:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02 13:50 jerinj [this message]
2023-05-02 13:50 ` [dpdk-dev] [PATCH v1] examples/ntb: " jerinj
2023-05-03  8:37   ` Ali Alnubani
2023-05-04  8:36   ` Guo, Junfeng
2023-05-04  8:46     ` Jerin Jacob
2023-05-04  8:53   ` [dpdk-dev] [PATCH v2] " jerinj
2023-05-04  9:07     ` Guo, Junfeng
2023-05-11  6:54     ` Gao, DaxueX
2023-05-11  7:02     ` David Marchand
2023-05-02 14:54 ` [dpdk-dev] [PATCH v1] examples/ip_pipeline: " Dumitrescu, Cristian
2023-05-11  6:51 ` Gao, DaxueX
2023-05-11  7:01 ` David Marchand
  -- strict thread matches above, loose matches on Subject: below --
2023-05-02 13:49 jerinj
2023-05-03  8:30 ` Ali Alnubani
2023-05-03  8:33   ` Ali Alnubani

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=20230502135045.3541570-1-jerinj@marvell.com \
    --to=jerinj@marvell.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@xilinx.com \
    --cc=jasvinder.singh@intel.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).