DPDK patches and discussions
 help / color / mirror / Atom feed
From: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
To: jasvinder.singh@intel.com, cristian.dumitrescu@intel.com
Cc: dev@dpdk.org, Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Subject: [dpdk-dev] [PATCH] examples/ip_pipeline: fix build error for gcc 4.8
Date: Thu,  9 Jun 2016 13:38:48 +0200	[thread overview]
Message-ID: <1465472328-226671-1-git-send-email-danielx.t.mrzyglod@intel.com> (raw)

This patch fixes a maybe-uninitialized warning when compiling DPDK with GCC 4.8

examples/ip_pipeline/pipeline/pipeline_common_fe.c: In function 'app_pipeline_track_pktq_out_to_link':
examples/ip_pipeline/pipeline/pipeline_common_fe.c:66:31: error:
'reader' may be used uninitialized in this function [-Werror=maybe-uninitialized]

   struct app_pktq_out_params *pktq_out =

Fixes: 760064838ec0 ("examples/ip_pipeline: link routing output ports to devices")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
---
 examples/ip_pipeline/app.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/ip_pipeline/app.h b/examples/ip_pipeline/app.h
index 848244a..592c17c 100644
--- a/examples/ip_pipeline/app.h
+++ b/examples/ip_pipeline/app.h
@@ -667,7 +667,7 @@ app_swq_get_reader(struct app_params *app,
 	struct app_pktq_swq_params *swq,
 	uint32_t *pktq_in_id)
 {
-	struct app_pipeline_params *reader;
+	struct app_pipeline_params *reader = NULL;
 	uint32_t pos = swq - app->swq_params;
 	uint32_t n_pipelines = RTE_MIN(app->n_pipelines,
 		RTE_DIM(app->pipeline_params));
@@ -727,7 +727,7 @@ app_tm_get_reader(struct app_params *app,
 	struct app_pktq_tm_params *tm,
 	uint32_t *pktq_in_id)
 {
-	struct app_pipeline_params *reader;
+	struct app_pipeline_params *reader = NULL;
 	uint32_t pos = tm - app->tm_params;
 	uint32_t n_pipelines = RTE_MIN(app->n_pipelines,
 		RTE_DIM(app->pipeline_params));
-- 
1.7.9.5

             reply	other threads:[~2016-06-09 10:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-09 11:38 Daniel Mrzyglod [this message]
2016-06-09 10:52 ` Dumitrescu, Cristian
2016-06-14 19:04 ` Thomas Monjalon
2016-06-16 13:35   ` Jastrzebski, MichalX K
2016-06-21  9:35 ` [dpdk-dev] [PATCH v2] " Daniel Mrzyglod
2016-06-21 17:43   ` Dumitrescu, Cristian
2016-06-22  8:44     ` Mrzyglod, DanielX T
2016-06-22  8:45   ` Mrzyglod, DanielX T

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=1465472328-226671-1-git-send-email-danielx.t.mrzyglod@intel.com \
    --to=danielx.t.mrzyglod@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=jasvinder.singh@intel.com \
    /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).