From patchwork Tue Oct 22 11:54:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Andrzej Ostruszka [C]" X-Patchwork-Id: 61645 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 958811BEE8; Tue, 22 Oct 2019 13:54:30 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 359641BEDB for ; Tue, 22 Oct 2019 13:54:26 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9MBfddx015564; Tue, 22 Oct 2019 04:54:25 -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=b4ljnFTeRvfjVnVfwkyX7rxubvoXzyUKtiSAhBdCsAUPQgFO06Rgq4JswkJi+g29Skwn CPoYSuOI/Y9zgeJ/D70LQOZQNiVk7MfhVjEx2JFbYxXeiXJtP49tr1c5QxOnahEsNChH owm+Yka5R691YSFzrGkyGuqWANnZXMe6ftEk2dRLACAW7ZcnfJjzOyPYwMTiJVY8ybM6 SDpH/h59z+XIFIVFscknYIVb2n23xbbYWhoXotK+9ifx+SzGsHysbbpNDK7nWxHLEzIM ztuBhgEmPuaTN9qlLGZMSMBIPAtoFdKsztTrtsyw4WGo9uMbs4iyd6qn3IiWAMsJF1aF hw== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2vsyjh8ac9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 22 Oct 2019 04:54:25 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 22 Oct 2019 04:54:24 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 22 Oct 2019 04:54:24 -0700 Received: from amok.marvell.com (unknown [10.95.130.40]) by maili.marvell.com (Postfix) with ESMTP id D2E0B3F7040; Tue, 22 Oct 2019 04:54:22 -0700 (PDT) From: Andrzej Ostruszka To: , Pavan Nikhilesh , Jerin Jacob CC: , Date: Tue, 22 Oct 2019 13:54:06 +0200 Message-ID: <20191022115412.8837-5-aostruszka@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191022115412.8837-1-aostruszka@marvell.com> References: <20190917075754.8310-1-amo@semihalf.com> <20191022115412.8837-1-aostruszka@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-22_03:2019-10-22,2019-10-22 signatures=0 Subject: [dpdk-dev] [PATCH v4 04/10] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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;