From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 628BC4F9B for ; Fri, 16 Nov 2018 17:59:11 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 11FB421F26; Fri, 16 Nov 2018 11:59:11 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 16 Nov 2018 11:59:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=MMaMq1fONtcmx5V+yJSJYvegHuJGflbFGFoIInYej0U=; b=oQUM7EhxRLYX DRq03N9VLGuJJJQcSgqoFizqI6mdMf02Kn4gDCj0DiCcRsyUWwQzVeM22AQ9rKW0 LbK/dG+TlJAZ5CHk51zInB0VRxXwPz1xJ91lpuAmhRQskHWieG0qLV0C4U7P9REa fExB9k7JCuqQDI+3a3YfmE2/Du2E4H4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=MMaMq1fONtcmx5V+yJSJYvegHuJGflbFGFoIInYej 0U=; b=AYjzhJ2raCp3LEjQlKTYGBptNhwtxYdcZ9nc6taeulSdgMpbblT6ep21V 8mMQXsYPo3wBRAmekLXzhKSA2UyPykVowC7kBVk6k0AeEHLFToSpn+hs2yyHbEHZ HHYwQwwtvZ8w57jAEwaREVGKXgWVhiZKb/aj93aW281N0rlfClcIhS8qd4ygplK6 GdyC99gKZs89e05t79TsMD19l/pBcfYKgnW5GAN6T62HwuxkUFiiZrBfJX2PZsRu ojRIeKl3DCym9tGOq8HuI8Yl14wxn9loygGNFti2HambzZgcZUJJQyZZ9lUAjrHt snFMlb0gD6v3RkQhVGIJ4APgE2tMg== X-ME-Sender: X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 431EC102EE; Fri, 16 Nov 2018 11:59:10 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: nikhil.rao@intel.com Date: Fri, 16 Nov 2018 17:58:53 +0100 Message-Id: <20181116165854.24017-5-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181116165854.24017-1-thomas@monjalon.net> References: <20181116165854.24017-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 4/5] eventdev: fix possible uninitialized variable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2018 16:59:12 -0000 When compiling with -O1, this error can appear: lib/librte_eventdev/rte_event_eth_tx_adapter.c:705:6: error: ‘ret’ may be used uninitialized in this function If tx_queue_id is -1 and nb_queues is 0, then ret is returned without being initialized. It is fixed by setting 0 as initial value. Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") Cc: nikhil.rao@intel.com Signed-off-by: Thomas Monjalon --- 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 3a21defba..ccf8a7550 100644 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c @@ -702,7 +702,7 @@ txa_service_queue_add(uint8_t id, struct txa_service_queue_info *tqi; struct rte_eth_dev_tx_buffer *tb; struct txa_retry *txa_retry; - int ret; + int ret = 0; txa = txa_service_id_to_data(id); -- 2.19.0