From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id DB5241B123; Tue, 9 Oct 2018 11:13:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2018 02:13:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,359,1534834800"; d="scan'208";a="81063629" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.212]) by orsmga006.jf.intel.com with ESMTP; 09 Oct 2018 02:13:36 -0700 From: Ferruh Yigit To: Nikhil Rao , Jerin Jacob Cc: dev@dpdk.org, Ferruh Yigit , stable@dpdk.org Date: Tue, 9 Oct 2018 11:13:22 +0100 Message-Id: <20181009101322.83223-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v1] eventdev: fix build error X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2018 09:13:39 -0000 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 --- 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