From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 553AFA00BE;
	Mon, 28 Oct 2019 15:22:40 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 403DF1BF51;
	Mon, 28 Oct 2019 15:22:10 +0100 (CET)
Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com
 [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id CA1A61BF42
 for <dev@dpdk.org>; Mon, 28 Oct 2019 15:22:01 +0100 (CET)
Received: from pps.filterd (m0045851.ppops.net [127.0.0.1])
 by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id
 x9SEKcuu005712; Mon, 28 Oct 2019 07:22:01 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;
 h=from : to : cc :
 subject : date : message-id : in-reply-to : references : mime-version :
 content-type : content-transfer-encoding; s=pfpt0818;
 bh=WtvEUYqBckyrkeuEw6xumA+/HgwP3du6EeauYxeRtMw=;
 b=MDNHbbEH+Cc9+Rjtzcw5dXRgmPr9lbv8LwW8rqhdhS+dEd3027BbmnWM0o3IU/f1Cvs5
 OAJW923vsOv/mOHCRmMfk/ryoShvOFSD3FQTn01HnE+8+AL+8ZtQHihUU5/GAbskwF42
 fGUuX8WXu706DaAZO0sPez414H80psU9YO1w3e4HWF/mLOyLqluatDeyVnlt4WQXLahw
 v14m+Splcw/RMtre9aPB2OtTArcfmrQgLn1mG4Drpzuhksbs1f5RnE7NfuKfuDRcqKHh
 3626KkFlxQOLzpYSbxPG8x/VXkF+xpfTDnfH56Akso1tC3gZNU74FWp2KLSPrBgf8Dyl Yw== 
Received: from sc-exch03.marvell.com ([199.233.58.183])
 by mx0b-0016f401.pphosted.com with ESMTP id 2vvnnnwnf0-2
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);
 Mon, 28 Oct 2019 07:22:01 -0700
Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com
 (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 28 Oct
 2019 07:21:59 -0700
Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com
 (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend
 Transport; Mon, 28 Oct 2019 07:21:59 -0700
Received: from amok.marvell.com (unknown [10.95.130.103])
 by maili.marvell.com (Postfix) with ESMTP id B17213F7041;
 Mon, 28 Oct 2019 07:21:57 -0700 (PDT)
From: Andrzej Ostruszka <aostruszka@marvell.com>
To: <dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>, Jerin Jacob
 <jerinj@marvell.com>
CC: <mattias.ronnblom@ericsson.com>, <stephen@networkplumber.org>
Date: Mon, 28 Oct 2019 15:21:39 +0100
Message-ID: <20191028142145.3758-6-aostruszka@marvell.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20191028142145.3758-1-aostruszka@marvell.com>
References: <20191022115412.8837-1-aostruszka@marvell.com>
 <20191028142145.3758-1-aostruszka@marvell.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8
 definitions=2019-10-28_05:2019-10-25,2019-10-28 signatures=0
Subject: [dpdk-dev] [PATCH v5 05/11] event/octeontx2: clean LTO build
	warnings (maybe-uninitialized)
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

During LTO build compiler reports some 'false positive' warnings about
variables being possibly used uninitialized.  This patch silences these
warnings.

Exemplary compiler warning to suppress (with LTO enabled):
error: ‘chunk’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
   bkt->current_chunk = (uintptr_t)chunk;

Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>
---
 drivers/event/octeontx2/otx2_tim_worker.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/event/octeontx2/otx2_tim_worker.h b/drivers/event/octeontx2/otx2_tim_worker.h
index b193e2cab..50db6543c 100644
--- a/drivers/event/octeontx2/otx2_tim_worker.h
+++ b/drivers/event/octeontx2/otx2_tim_worker.h
@@ -337,7 +337,7 @@ tim_add_entry_brst(struct otx2_tim_ring * const tim_ring,
 		   const struct otx2_tim_ent *ents,
 		   const uint16_t nb_timers, const uint8_t flags)
 {
-	struct otx2_tim_ent *chunk;
+	struct otx2_tim_ent *chunk = NULL;
 	struct otx2_tim_bkt *bkt;
 	uint16_t chunk_remainder;
 	uint16_t index = 0;
-- 
2.17.1