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 0C6B356A3 for ; Fri, 16 Nov 2018 17:59:18 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id AF03421FAE; Fri, 16 Nov 2018 11:59:17 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 16 Nov 2018 11:59:17 -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=1jCV04WpCgs12GcClNZQyIT/H6pSpxiDBnDYhpD5sb8=; b=K9eyM3OW4NGm RmQZCPhvgpWq1eZf5PNf4pBOpYW23UGbKWe4NRGd+8o5FCX17vrjjutjYK2cmyWp YdxYZz81eRMMLvUynk2R8zstqDejK8Nq4E3kK+vWYE13oeLaNChWWLZamGM/q4zT RBxB+3siVaIblFFxyRgf+q6e03LAH2A= 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=1jCV04WpCgs12GcClNZQyIT/H6pSpxiDBnDYhpD5s b8=; b=wN2NP5+o9U6ySOydZ9RRzvdvj94V2OesriFtTRGrQ+uS9K5+04Fx8jlPP e2jAXsPFZTuuC2XzAGlWzUs9ZbkBBpRpMvFYCYB0HEZt5DMLW6WWNlThu8i6iBef Jq0KQ5ygW5ypuj87Y49hqa1PPm0c+vfb6WHRywfoFMTEICScDnh5UhCmLC6FLxT3 XrrRU0F6EKPBWRjZ0vByYsna2PHy4MPooFrwWj7xXqg3qX0HhxXeIIA2sD5ghJZW SH3tYAs4uroSLWvXb71dle39oEDYAckVPtsmdSGVv/EBzJix8RUO6mII7jRDPfVB RCF0pFtZIHxVul8y2+OFadumpX03A== 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 84684102E0; Fri, 16 Nov 2018 11:59:16 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: pbhagavatula@caviumnetworks.com Date: Fri, 16 Nov 2018 17:58:54 +0100 Message-Id: <20181116165854.24017-6-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 5/5] app/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:18 -0000 When compiling with -O1, this error can appear: app/test-eventdev/test_pipeline_common.c:332:6: error: ‘ret’ may be used uninitialized in this function If there is no device, then ret is returned without being initialized. It is fixed by setting 0 as initial value. Fixes: 032a965a8f1d ("app/eventdev: support Tx adapter") Cc: pbhagavatula@caviumnetworks.com Signed-off-by: Thomas Monjalon --- app/test-eventdev/test_pipeline_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c index d07fa8826..5db3ffde1 100644 --- a/app/test-eventdev/test_pipeline_common.c +++ b/app/test-eventdev/test_pipeline_common.c @@ -329,7 +329,7 @@ int pipeline_event_tx_adapter_setup(struct evt_options *opt, struct rte_event_port_conf port_conf) { - int ret; + int ret = 0; uint16_t consm; RTE_ETH_FOREACH_DEV(consm) { -- 2.19.0