From nobody Sun May 19 12:13:33 2024 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+75046+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+75046+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=posteo.net ARC-Seal: i=1; a=rsa-sha256; t=1620777692; cv=none; d=zohomail.com; s=zohoarc; b=NFvzcSTUQZVwio96LVcMAJNPH4A9xllJdU/iqaUgGG2LED09v5HW93kKwrL8uzhqfxs3vwJCQ7jTdX8ZN1SNlpFHO72H/zxd3Uc/rYexLiLA19ns/+mLyeHSS5A6UWEbRjFZrb86ajEDpBnfLGxrxC1oAHjsFh9G8rkbRGbO6K8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620777692; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=P1i1tO4B/XCmLouf+xrEmVSW0lYs15Gr2M0yxdppoSA=; b=XJNDrv8WaQFGgK0wlENmFFfFhpNirnJ7ILCEYJGcCgnbOHXCV4uznQFvI0UwuokPYKIQGMPdDfc8777KEROwM4CBEcK8SYMUwdk1qpOMG56NbBMpamk3Rv6c4rKDnwfvkakDHL1da8bPmJEU0BxdhAgcsBzuzD0/lyrbQNbJM0Y= 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+75046+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 162077769235468.40409816836302; Tue, 11 May 2021 17:01:32 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id OQyXYY1788612xQHuQwGKT5v; Tue, 11 May 2021 17:01:31 -0700 X-Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by mx.groups.io with SMTP id smtpd.web11.4556.1620773793184946230 for ; Tue, 11 May 2021 15:56:33 -0700 X-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id B589D2400FE for ; Wed, 12 May 2021 00:56:30 +0200 (CEST) X-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FftZj4JSdz9rxL; Wed, 12 May 2021 00:56:29 +0200 (CEST) From: "Sergei Dmitrouk" To: devel@edk2.groups.io Cc: Ray Ni , Zhichao Gao Subject: [edk2-devel] [PATCH v1 1/2] ShellPkg/UefiShellCommandLib: suppress incorrect gcc warning Date: Tue, 11 May 2021 22:56:15 +0000 Message-Id: <20210511225616.5942-2-sergei@posteo.net> In-Reply-To: <20210511225616.5942-1-sergei@posteo.net> References: <20210511225616.5942-1-sergei@posteo.net> Precedence: Bulk List-Unsubscribe: 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,sergei@posteo.net X-Gm-Message-State: mJGvy8k7f3K8ImfKjdzrj0h2x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1620777691; bh=MwVRaTdacmTewIMyCbiHzcQuqQBGseGlPdhXeWXwPDc=; h=Cc:Date:From:Reply-To:Subject:To; b=Hl76z/u3w9b4RcYV59zSVCJOkvyciMXN8LprM50y1TpTjSnizxFG8qbazFN/TYfS1ap d3vICgOOyPrblu6ZwdnmpFOPp+nhyqPWbt5MJ9lHejxUjtTq7m+3wHrDUNpabno1OK5Cc lelYZ+5nxBDF8vnjpfYMi6Ir1clrY9ololI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" `Dupes` is used only if `Duplicates !=3D NULL` and function is left if allocation of memory for `Dupes` fails, so it can't be used uninitialized. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3228 Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Sergei Dmitrouk Reviewed-by: Laszlo Ersek --- ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c b/S= hellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c index b06d22592d33..81923c8ae737 100644 --- a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c +++ b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c @@ -2128,6 +2128,11 @@ ShellSortFileList ( } } =20 + // + // Set Dupes to suppress incorrect compiler/analyzer warnings. + // + Dupes =3D NULL; + // // If separation of duplicates has been requested, allocate the list for // them. --=20 2.17.6 -=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 (#75046): https://edk2.groups.io/g/devel/message/75046 Mute This Topic: https://groups.io/mt/82760957/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- From nobody Sun May 19 12:13:33 2024 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+75047+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+75047+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=posteo.net ARC-Seal: i=1; a=rsa-sha256; t=1620777701; cv=none; d=zohomail.com; s=zohoarc; b=cOSWkq01whg6mA08aU4VA6Fv3VWghAnyTmYEwPd1N/0q6VNPmDxrnLDkznR+rJmqlgCSZCf/QincmtLKYEGvDZTjPejPLKsqgSZkB6exmtJ3nDEFFP71DKOXVLwdYHH0bA53sYuQpQFsCmBnxqA96V2IDghEHyaDp9tqcp5mw2c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620777701; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=uir9r5sRhFCr8h0syrHCF/j4B67SVGG7pMSqv1kSaeo=; b=IV/r3KlumgQEFNU+2jZzGzIq/Jqrjo3zY5pjJ+Oz4Wf+BibcHOTw8DFGxpS/opiaA8XAFttKgljr7579IMovnFzf+P5b9bdwxjQTj5R+YSQrm4Nk+NbzTPaYuZb4xveawtImZlT5Cw/Ww7iaV3V/1Eoco+7pagZS5JTjcb85ZQQ= 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+75047+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1620777701145913.0854932769815; Tue, 11 May 2021 17:01:41 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Hey2YY1788612x29siw2XscS; Tue, 11 May 2021 17:01:35 -0700 X-Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by mx.groups.io with SMTP id smtpd.web10.4431.1620773793572967732 for ; Tue, 11 May 2021 15:56:33 -0700 X-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 5C4812400FC for ; Wed, 12 May 2021 00:56:31 +0200 (CEST) X-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FftZk2mgJz9rxK; Wed, 12 May 2021 00:56:30 +0200 (CEST) From: "Sergei Dmitrouk" To: devel@edk2.groups.io Cc: Laszlo Ersek , Ard Biesheuvel , Jordan Justen Subject: [edk2-devel] [PATCH v1 2/2] OvmfPkg/VirtioFsDxe: suppress incorrect gcc warnings Date: Tue, 11 May 2021 22:56:16 +0000 Message-Id: <20210511225616.5942-3-sergei@posteo.net> In-Reply-To: <20210511225616.5942-1-sergei@posteo.net> References: <20210511225616.5942-1-sergei@posteo.net> Precedence: Bulk List-Unsubscribe: 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,sergei@posteo.net X-Gm-Message-State: sc74HVlFZypQDTxmFLNZonLix1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1620777695; bh=MS74aSgO9etr6sOA8xY3Oy5OsTznSveK1Cy+igSvnPk=; h=Cc:Date:From:Reply-To:Subject:To; b=BHUVTD82tEG971k/Q13QcH//p3AYNplHnJkVX0G+N5Q6+ZXgNJGbQxAPN4twl188pLI 9c3R1DXM8mpp19pM0HvtCHJyA1jaYCRYdx37WNkfhfLsTTyNt2isyCz4zOkRZRw87cJe0 ITu6wde31F/HwJ2qmsHBqGR34VWVifTuaD8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" `CreateDirectoryIfCreating` is used only if `PermitCreation` is set. `NewNodeIsDirectory` might not set in case of error, but that would lead to leaving the function before invalid use. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3228 Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Jordan Justen Signed-off-by: Sergei Dmitrouk Reviewed-by: Laszlo Ersek --- OvmfPkg/VirtioFsDxe/SimpleFsOpen.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/OvmfPkg/VirtioFsDxe/SimpleFsOpen.c b/OvmfPkg/VirtioFsDxe/Simpl= eFsOpen.c index d73d23fe8665..9e46e8ab8385 100644 --- a/OvmfPkg/VirtioFsDxe/SimpleFsOpen.c +++ b/OvmfPkg/VirtioFsDxe/SimpleFsOpen.c @@ -332,6 +332,12 @@ VirtioFsSimpleFileOpen ( return EFI_INVALID_PARAMETER; } =20 + // + // Set CreateDirectoryIfCreating to suppress incorrect compiler/analyzer + // warnings. + // + CreateDirectoryIfCreating =3D FALSE; + // // Validate the Attributes requested for the case when the file ends up = being // created, provided creation is permitted. @@ -426,6 +432,11 @@ VirtioFsSimpleFileOpen ( goto FreeNewCanonicalPath; } =20 + // + // Set NewNodeIsDirectory to suppress incorrect compiler/analyzer warnin= gs. + // + NewNodeIsDirectory =3D FALSE; + // // Try to open LastComponent directly under DirNodeId, as an existent re= gular // file or directory. --=20 2.17.6 -=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 (#75047): https://edk2.groups.io/g/devel/message/75047 Mute This Topic: https://groups.io/mt/82760960/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-