From nobody Wed Nov 25 04:03:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+113545+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+113545+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1704930761; cv=none; d=zohomail.com; s=zohoarc; b=IM3aOAoJGzu+fJ4SjnJjQ3ufAuOj9V0cl7vIAg5BrrSn44X0tyLNUm3b+8WpdVICESD7pw/ssIqHvGpfnrAkcJjZxWEcD41f8gB/SKkTdu6q7M6x1hFvl7Neby/Oi9flZ8prcgjcBsq6Tig1P+3JLBYFBbLKyaoAZlukZpFyh4w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704930761; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=WcC4xECMePIs2w7Uf+9S4FA5wju/iG9lrTeCWUNe1Vw=; b=FPSQtMPkHjWQOczt2/Rb1OdIILh6tL0+UCZGnx1CWrqFWTwMe6hvIikYHxB0yaMI5daEpLvY0uayAmM/BKW+5ZVtJt8Crq5l+nlvlC7ocg5rC0USYndjYE7+1TcGrdW2YLWZw+8ncppcLc+TsMLJwjhP4h5ZnIYymo/gIVEMYmU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+113545+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1704930761833143.44065833256604; Wed, 10 Jan 2024 15:52:41 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=gcFqGGlOyroBFUBtjrUZiNMamuL4z58+7ZR0ydUsnww=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1704930761; v=1; b=Hodj1kx6h/LdGhhF5g/1rQI+0Rqxn0ozcReyTYlEcAHcPIFAlQBtuglpE0naQjRWGkMcYI6L ZNtiP4Wd9Q+9OE0VHAKFFRpbzxnY0MYuV0ELPMyiSi8EvKggPkYzPj2RShcuw487SRoihHWYHsE VbSyT7ecOcfUa9v/Fl3r1Pl8= X-Received: by 127.0.0.2 with SMTP id vxTdYY1788612xuy1mmyghM4; Wed, 10 Jan 2024 15:52:41 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.9112.1704930760938820271 for ; Wed, 10 Jan 2024 15:52:41 -0800 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 51893106F; Wed, 10 Jan 2024 15:53:26 -0800 (PST) X-Received: from u200865.usa.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3E9DD3F5A1; Wed, 10 Jan 2024 15:52:40 -0800 (PST) From: "Jeremy Linton" To: devel@edk2.groups.io Cc: ardb+tianocore@kernel.org, quic_llindhol@quicinc.com, Jeremy Linton Subject: [edk2-devel] [PATCH 2/5] Silicon/Broadcom/BcmGenetDxe: Suppress some bogus compiler warnings Date: Wed, 10 Jan 2024 17:52:24 -0600 Message-ID: <20240110235227.2734271-3-jeremy.linton@arm.com> In-Reply-To: <20240110235227.2734271-1-jeremy.linton@arm.com> References: <20240110235227.2734271-1-jeremy.linton@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jeremy.linton@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: fYGEXqrBVXqWFk3KZhFXuUfhx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1704930763398100005 Content-Type: text/plain; charset="utf-8" Some recent GCC revisions will throw warnings about values being used before being initialized. But in the case where the lack of initialization is the result of the called function returning error status the EFI_ERROR() macro/error seems to confuse the compiler about the fact that the value is then never used. So, while the code appears to be fine, lets just zero the variables anyway to make the compiler happy. Signed-off-by: Jeremy Linton --- Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.c | 2 ++ Silicon/Broadcom/Drivers/Net/BcmGenetDxe/SimpleNetwork.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.c b/Silico= n/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.c index 9e5d30fafd..2d5f70170e 100644 --- a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.c +++ b/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.c @@ -381,6 +381,8 @@ GenericPhyUpdateConfig ( BOOLEAN LinkUp; =20 Status =3D GenericPhyGetLinkStatus (Phy); + Speed =3D 0; + Duplex =3D 0; LinkUp =3D EFI_ERROR (Status) ? FALSE : TRUE; =20 if (Phy->LinkUp !=3D LinkUp) { diff --git a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/SimpleNetwork.c b/Sil= icon/Broadcom/Drivers/Net/BcmGenetDxe/SimpleNetwork.c index 3b51a86d65..7a7c398b1f 100644 --- a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/SimpleNetwork.c +++ b/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/SimpleNetwork.c @@ -731,6 +731,9 @@ GenetSimpleNetworkReceive ( UINT8 *Frame; UINTN FrameLength; =20 + DescIndex =3D 0; + FrameLength =3D 0; + if (This =3D NULL || Buffer =3D NULL) { DEBUG ((DEBUG_ERROR, "%a: Invalid parameter (missing handle or buffer)= \n", __FUNCTION__)); --=20 2.43.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113545): https://edk2.groups.io/g/devel/message/113545 Mute This Topic: https://groups.io/mt/103652854/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-