DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Nikhil Rao <nikhil.rao@intel.com>,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v1] eventdev: fix build error
Date: Tue,  9 Oct 2018 11:13:22 +0100	[thread overview]
Message-ID: <20181009101322.83223-1-ferruh.yigit@intel.com> (raw)

build error:
.../lib/librte_eventdev/rte_event_eth_tx_adapter.c:
  In function ‘txa_service_queue_del’:
.../lib/librte_eventdev/rte_event_eth_tx_adapter.c:800:7:
  error: ‘ret’ may be used uninitialized in this function
  [-Werror=maybe-uninitialized]
compilation terminated due to -Wfatal-errors.

https://mails.dpdk.org/archives/test-report/2018-October/065919.html

'ret' may be used uninitialized when 'dev->data->nb_tx_queues' is 0,
although this is not a practical value, initialize 'ret' to cover this
case.

Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
index aae0378d5..3a21defba 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -797,7 +797,7 @@ txa_service_queue_del(uint8_t id,
 
 	if (tx_queue_id == -1) {
 		uint16_t i;
-		int ret;
+		int ret = -1;
 
 		for (i = 0; i < dev->data->nb_tx_queues; i++) {
 			ret = txa_service_queue_del(id, dev, i);
-- 
2.17.1

             reply	other threads:[~2018-10-09  9:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09 10:13 Ferruh Yigit [this message]
2018-10-10 19:43 ` 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=20181009101322.83223-1-ferruh.yigit@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=nikhil.rao@intel.com \
    --cc=stable@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).