From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.5830.1597194604628815674 for ; Tue, 11 Aug 2020 18:10:04 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=e7lRBUBk; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: liming.gao@intel.com) IronPort-SDR: WW5IthoTsX2iiThh3LWzXpGFQFH1aRtHocU11thTk3arEXR0sPjEc6yoFI159NlkNyXgIJXtsg fyETOzZKY/1A== X-IronPort-AV: E=McAfee;i="6000,8403,9710"; a="238703247" X-IronPort-AV: E=Sophos;i="5.76,302,1592895600"; d="scan'208";a="238703247" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 18:10:04 -0700 IronPort-SDR: tsxYcMbCSMQlyfv+fLCP8x7UqmgW5uVnQ2GCnyYZwp5Oqi+XkauH9sQ6Bc4CPdqMLoVb8GiGBK OVbXCuGEXlEQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,302,1592895600"; d="scan'208";a="276438501" Received: from unknown (HELO fmsmsx605.amr.corp.intel.com) ([10.18.84.215]) by fmsmga007.fm.intel.com with ESMTP; 11 Aug 2020 18:10:04 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 11 Aug 2020 18:09:22 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 11 Aug 2020 18:09:22 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 11 Aug 2020 18:08:01 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.45) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 11 Aug 2020 18:07:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mID/wxuxM+tUavOfPIw+itrc7iengGeFBhPK9+xA4qOwZ2yq31CcN79QGtCnx1hxiuH/6Dni9hmCkW71vN6tCDRhCF1niURWmqEQKMKBdokApKs+4s1FPEivHM6P8N9BJgt+PdbVsPZvsIK+PnnT4+rSU2WyRvJDuBU6GfRDOeVsqYILs3o+Tjtx6GafIxsvKuBLNW/630gyA1F4BIznXuMCRcod79PFhSk5NeqVpyWe3/lzTBJnE4Go7MBYsnMa9FTwdtpslLDDDM0NOhKx9JlJfJBFkIXgYTML0XzdPcfFOJOpE5e/+tSSQoKJ8e7odQ5dEeywwQAAOmQsaPL53Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hYQN3hzXnZFDwAmsxJB7eNijNtb2qrJlF2BhOZ664gE=; b=J/fiHAIuHwjJP4rqdPg61m6XjAOAgk1wWfZOJp7keJreZsOsS23d0cPCBWgNZOltcLQRXEHpTsL6v/t9Jg7UbTLPBLT8OTWsUs4lhal5ZI1R2Wzu7xKDLQOeN+w9B2Vzej2k010GugpB+DIaVkLyIl5nsiSIjohT2u4XDOSOhgRQ3ftf0SIEFqEv8/KZx685HgiirGI0OTotSvUEQvHQMv5JVVIPj3RIZWjzE3bIf9lIhYuEUyEX4rK46nkydAzmEUn/yc2/MSIENn9biTFZeK4NrOS2MeU6e4mzi7YD1TuMhBp3BT/ddcrLUMckEvp3oZWSABG02k6OVYi+zRJNPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hYQN3hzXnZFDwAmsxJB7eNijNtb2qrJlF2BhOZ664gE=; b=e7lRBUBk8mDwDlAQIBrucR8gm76e7mv6c9/dDmOjXDEem/ZJX9df+M6XE2Qwgcwy7/xrI5vGxD/wMnjCTlNiiBAA/Q3H+rxdKp/Uq+h/gRUslbJ0/yGOKkfcTysCu060mFCxZuaPufcuo9mb6NLV7wq3Rr4X//asOw8fcsjdV40= Received: from CY4PR11MB1526.namprd11.prod.outlook.com (2603:10b6:910:7::10) by CY4PR11MB1830.namprd11.prod.outlook.com (2603:10b6:903:125::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.15; Wed, 12 Aug 2020 01:07:46 +0000 Received: from CY4PR11MB1526.namprd11.prod.outlook.com ([fe80::f8c4:711:84e3:4c97]) by CY4PR11MB1526.namprd11.prod.outlook.com ([fe80::f8c4:711:84e3:4c97%4]) with mapi id 15.20.3261.025; Wed, 12 Aug 2020 01:07:46 +0000 From: "Liming Gao" To: "devel@edk2.groups.io" , "michael.kubacki@outlook.com" CC: "Kinney, Michael D" , "Jiang, Guomin" , "Xu, Wei6" Subject: Re: [edk2-devel] [PATCH v1 1/1] FmpDevicePkg/FmpDxe: Fix Clang build error Thread-Topic: [edk2-devel] [PATCH v1 1/1] FmpDevicePkg/FmpDxe: Fix Clang build error Thread-Index: AQHWcD8FVzznp2Y2gECR4HQHBM2nl6kzqPzg Date: Wed, 12 Aug 2020 01:07:46 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.194] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 563b5cbd-455e-4089-707d-08d83e5c1fcf x-ms-traffictypediagnostic: CY4PR11MB1830: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Pjsy1lFxBmCoLcPnnILZJyWLTYdF0mGh8/46LIGWPEfvz2jHeH6xRl3hsgA1mP1fiu3vspZiv0aibaJ9iA9Ifze8uXqAzY8uyH4trf20L6KBuS8mf5KWXfpkLYQgAEQercvIbPuljJpnC8Ta9OspSSF7vR1eoqZnUh0vntwUJLF36+bR7QgUi6/JzOEgv0eXXybCVf6JCVMHVmMlKjxQK5Wx/ZSTNr5HU5zkEnTo3w/A9ayXKZpRS1iVXoa0XeQJkXY/zCaEKySYZ6+EUiNoPycFAD1BTQGpud3IsESnKeqxna8AWxbWD6hUHHvsdReF6ItISpb2AN8ccLm2NSOpqmwEiYjGNaxrKrqpZuYq4uIq0Vp4Tt1UCLkZAzQrXtovFZ+6u4Y9qyM8E0a8M16JXQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR11MB1526.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(346002)(136003)(366004)(396003)(39860400002)(186003)(33656002)(53546011)(64756008)(2906002)(26005)(71200400001)(6506007)(76116006)(66946007)(66446008)(66476007)(66556008)(9686003)(55016002)(7696005)(966005)(52536014)(5660300002)(4326008)(478600001)(107886003)(86362001)(316002)(83380400001)(8936002)(110136005)(54906003)(8676002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: 8xCobGVOJ2QFdjw/FIoPzjqQCBvzBRj2uD+kn/R0M5pe3+/NJtxECd/AnSumf9eFpY/gviBi/qo9oEOKalQtoqA6ourtajEd+tP1IwIX2ABXGXuLLcZM3utmVwdMRoaAPBV0oE9tK7oMt9gs3jyRCIPOH+Z4ZioAWWwiPdlhzDSZTmtUnKvJ9COJAt2OPcwnrzjHx4AR0YEb1d8ycimmG39Um1nqNPPpxi19LtylNUDqa6WpMJyH2SPu0ZMrucMI+YPIkCZa9X/xJAQ+2ATNKPiwBMXnTQb7IuigUloX802F7A8IOVPTUCSVJtFItJLxdB5oU6a3MyLA/sVR3X2JO0JsQK8gloKEEhmCI2Df1p+HrWPnX2H2uBLkLYXRepa0JDjgGV1kJ3pzmAdFcaT/S8sSHDQn8ZFdn2cd3om6BAz7VjBGvUhT7ObCouAugR1j7xZCm8j1uxnFzSNgK8YzgUchf6QfUrJJPg38aO7xliHaH97tbFO1o9V1IqlqwhE8/ims3WIhvQuk1IhDUEGE08liuEKPh9A51SQwSaQ3Ji/vGE31xHGQn4ccIh3m8Zrklr8ndZQY1ZJSMeSfUdHDSTp6VfORDLqBDnfeZTYFhDi1V5juYj2J8reMh9dnECeiMdSZAsEoZzQfQqI6ZxvbVQ== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB1526.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 563b5cbd-455e-4089-707d-08d83e5c1fcf X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Aug 2020 01:07:46.2967 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ctuKSm3fnpY2xDXuMljMf8Ko4qudVzpLv2eVecu0bzBkJQihoA60XZg8rqbDio5liT5GXiKHsHyJqTPS0VY6Pg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1830 Return-Path: liming.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable Tested-by: Liming Gao Reviewed-by: Liming Gao -----Original Message----- From: devel@edk2.groups.io On Behalf Of Michael Kub= acki Sent: 2020=1B$BG/=1B(B8=1B$B7n=1B(B12=1B$BF|=1B(B 8:24 To: devel@edk2.groups.io Cc: Gao, Liming ; Kinney, Michael D ; Jiang, Guomin ; Xu, Wei6 Subject: [edk2-devel] [PATCH v1 1/1] FmpDevicePkg/FmpDxe: Fix Clang build = error From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2887 The local Private pointer variable in SetTheImage() is initialized based o= n the caller provided This pointer argument. The cleanup label path uses th= e Private pointer which will not be initialized if This is NULL. This change initializes Private to NULL and accounts for Private potential= ly being NULL in the cleanup label path. Cc: Liming Gao Cc: Michael D Kinney Cc: Guomin Jiang Cc: Wei6 Xu Signed-off-by: Michael Kubacki --- FmpDevicePkg/FmpDxe/FmpDxe.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c i= ndex 854feec0a162..427b215ddc5f 100644 --- a/FmpDevicePkg/FmpDxe/FmpDxe.c +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c @@ -1043,6 +1043,7 @@ SetTheImage ( UINT32 DependenciesSize; =20 Status =3D EFI_SUCCESS; + Private =3D NULL; Updateable =3D 0; BooleanValue =3D FALSE; FmpHeaderSize =3D 0; @@ -1293,7 +1294,10 @@ SetTheImage ( =20 cleanup: mProgressFunc =3D NULL; - SetLastAttemptStatusInVariable (Private, LastAttemptStatus); + + if (Private !=3D NULL) { + SetLastAttemptStatusInVariable (Private, LastAttemptStatus); } =20 if (Progress !=3D NULL) { // @@ -1306,7 +1310,9 @@ SetTheImage ( // Need repopulate after SetImage is called to // update LastAttemptVersion and LastAttemptStatus. // - Private->DescriptorPopulated =3D FALSE; + if (Private !=3D NULL) { + Private->DescriptorPopulated =3D FALSE; } =20 return Status; } -- 2.28.0.windows.1