From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6E8DFA034E; Thu, 7 Nov 2019 16:04:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 875721BF8F; Thu, 7 Nov 2019 16:03:45 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 2BFEF1BF89 for ; Thu, 7 Nov 2019 16:03:43 +0100 (CET) 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 xA7Esquw023813; Thu, 7 Nov 2019 07:03:42 -0800 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=RETDJ72H+sFGrRYB8z/HJt4ON0TykTqv8NA9rJqqQtw=; b=oK9mIaffw2/aD3XPslTrnWd2RIGGTAOyNimlm+U+nLN90BZTfZ97Sncq1EQGpYwqZLpP VJKDhW6yrOCe0vPnN4nLcC8ne7LuOPJZk92TxP0xdJnvNr9fy/etLsDj3+BDEiVcvdcS F4LVPH+06W1CKotpi15wUlZrA8/YKp7crLBRi2PsuvFsrgFfES+r6QA9KWbie1lZIb0W DbGmnNaOD9JfC3mgJGB4HH3MBqBFcpz/PZQFO5Ba1UE+h7ZG1SaXRAE+unMc2dAqC9AP V0nSYM/0+W8h1zs0MdAUaRr6fm5xPSaUF0DzcoyVC3qdR9s0ytBMJYEbxgn+Gjt1MtPj VA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2w41uwvrfw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 07 Nov 2019 07:03:42 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 7 Nov 2019 07:03:41 -0800 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; Thu, 7 Nov 2019 07:03:41 -0800 Received: from amok.marvell.com (unknown [10.95.130.48]) by maili.marvell.com (Postfix) with ESMTP id 232DC3F703F; Thu, 7 Nov 2019 07:03:39 -0800 (PST) From: Andrzej Ostruszka To: , Wenzhuo Lu CC: , Date: Thu, 7 Nov 2019 16:03:15 +0100 Message-ID: <20191107150318.3677-10-aostruszka@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191107150318.3677-1-aostruszka@marvell.com> References: <20191029141212.4907-1-aostruszka@marvell.com> <20191107150318.3677-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,18.0.572 definitions=2019-11-07_05:2019-11-07,2019-11-07 signatures=0 Subject: [dpdk-dev] [PATCH v7 09/12] net/e1000: 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: ‘link’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (link) { Signed-off-by: Andrzej Ostruszka --- drivers/net/e1000/base/e1000_82543.c | 2 +- drivers/net/e1000/base/e1000_ich8lan.c | 2 +- drivers/net/e1000/base/e1000_phy.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/e1000/base/e1000_82543.c b/drivers/net/e1000/base/e1000_82543.c index 810899eb6..dfde2a8b9 100644 --- a/drivers/net/e1000/base/e1000_82543.c +++ b/drivers/net/e1000/base/e1000_82543.c @@ -1027,7 +1027,7 @@ STATIC s32 e1000_setup_copper_link_82543(struct e1000_hw *hw) { u32 ctrl; s32 ret_val; - bool link; + bool link = true; DEBUGFUNC("e1000_setup_copper_link_82543"); diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c index accc6ea01..5241cf698 100644 --- a/drivers/net/e1000/base/e1000_ich8lan.c +++ b/drivers/net/e1000/base/e1000_ich8lan.c @@ -5533,7 +5533,7 @@ void e1000_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw) void e1000_gig_downshift_workaround_ich8lan(struct e1000_hw *hw) { s32 ret_val; - u16 reg_data; + u16 reg_data = 0; DEBUGFUNC("e1000_gig_downshift_workaround_ich8lan"); diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c index 7d08f836f..956c06747 100644 --- a/drivers/net/e1000/base/e1000_phy.c +++ b/drivers/net/e1000/base/e1000_phy.c @@ -1664,7 +1664,7 @@ s32 e1000_copper_link_autoneg(struct e1000_hw *hw) s32 e1000_setup_copper_link_generic(struct e1000_hw *hw) { s32 ret_val; - bool link; + bool link = true; DEBUGFUNC("e1000_setup_copper_link_generic"); -- 2.17.1