From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.9671.1597215890681894294 for ; Wed, 12 Aug 2020 00:04:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=crzN6QEA; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: guomin.jiang@intel.com) IronPort-SDR: iCrILjF8S0D43Dg7MSzrqkoBXq6NMc6Qpo+jXH4CaJu/7ms64Ou/3p3Ae/6mqd1waAN3Tz/tKu GlPLNI/x5OcQ== X-IronPort-AV: E=McAfee;i="6000,8403,9710"; a="133953778" X-IronPort-AV: E=Sophos;i="5.76,303,1592895600"; d="scan'208";a="133953778" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2020 00:04:49 -0700 IronPort-SDR: 5mm7vRBh4UDC5fmx05y5jsLGM+L0iKpWYafAVWgoW8IYFYyUJgsBAT85Zd7Q0Kw365O4feQ2z/ KoBaibxBU0RA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,303,1592895600"; d="scan'208";a="290945191" Received: from orsmsx606-2.jf.intel.com (HELO ORSMSX606.amr.corp.intel.com) ([10.22.229.86]) by orsmga003.jf.intel.com with ESMTP; 12 Aug 2020 00:04:49 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 12 Aug 2020 00:04:48 -0700 Received: from orsmsx114.amr.corp.intel.com (10.22.240.10) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 12 Aug 2020 00:04:48 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX114.amr.corp.intel.com (10.22.240.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 12 Aug 2020 00:04:48 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.105) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 12 Aug 2020 00:04:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k3Uc6zH/HmQVpXNCGAXHs2153MNAfVcdBYM1SKl+qH97TmgrjWszXC7SoJ9iw5ZBdbPP4f9DSPYOkHSlc3DVbZ1SOaWyDR+ONu0SLaLqHJBUXVrWTkzdqHnrCW0D/Sxk19UPBfI3XssHBqFAiQGyyNH+0AfaK2rw/PBcqzCZsms6bKioSiAYZuAZbExX94TKg2DnnDysbLKaW5qF0hMiVm6459JG+uYKvszcZOJB8idaiut5R+HfTHy7vZtWpSCkXnt+F1V5kN4VbgN2Ect4UwDn9627VNATzNNbUxnaJbYiw40NVi+uZ8mRuVumtSuNlk9BlX9WmUAHw/mQYp8g6Q== 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=/V5ucSqWk+gCDHNwej3F0OiUrqVVCiLsek42Hn1rba4=; b=oKQGIRGjXtZdbFxN7hDJvOZ5Ad5Iyn7RYXjo+cWqRASEG3WCkDYv/Joe5YhDlIaAAO0X4nQ6vSsqR8/ERwjidfsn6ItmglV+g/Maf5oW2oHf4nBU88UnaeUxKY8Zxs3zciSgNyJxQCvL+WSUbe8DAb7UNFWepdmeIG67yoJhMZoFuNf50mWD5Zs7VCU9qE4RJOO6B/dYtGBlQ1OFq/xpTQA2lhrZ1dOZre7T1OIgE71DkJv/dnDZROsZOxfyU8XLl0he5aj5YuGRs6oMSxrhXxyEv4x3m+Xm0SprLLfxt8LryxpSO+HNc2wzFscuCz0RU9xTAsGdPVZzddmQB4koMA== 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=/V5ucSqWk+gCDHNwej3F0OiUrqVVCiLsek42Hn1rba4=; b=crzN6QEAg9XxrRvYVK2QpUqW4zuSlO0K3/+8WNI0hNsGcRhCLcuGg3hXjR8YADGn1TlzizlJb1oTEAIDfL5UaVgJCvQtRZyOYqZ2uiC7Js1WZJdIf4ledzuPeob1D57Cwl5TEfL8NH/r6XZquN0OR5gvKZRH1F/SO5DOtWhh9uU= Received: from DM6PR11MB2955.namprd11.prod.outlook.com (2603:10b6:5:65::31) by DM6PR11MB4490.namprd11.prod.outlook.com (2603:10b6:5:1df::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.15; Wed, 12 Aug 2020 07:04:46 +0000 Received: from DM6PR11MB2955.namprd11.prod.outlook.com ([fe80::6d20:b482:b693:52c0]) by DM6PR11MB2955.namprd11.prod.outlook.com ([fe80::6d20:b482:b693:52c0%7]) with mapi id 15.20.3261.025; Wed, 12 Aug 2020 07:04:46 +0000 From: "Guomin Jiang" To: "devel@edk2.groups.io" , "michael.kubacki@outlook.com" CC: "Gao, Liming" , "Kinney, Michael D" , "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: AQHWcD8H6ofOp28mj0+lkQZTq2B2Vak0DQZw Date: Wed, 12 Aug 2020 07:04: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.203] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d69367fd-4217-49a6-4db0-08d83e8dff64 x-ms-traffictypediagnostic: DM6PR11MB4490: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: On4cA2jKKNqwsu8EFGMsF2yAdWRw6xAwFdkPcIuGWskPvfMAqQ4Qe/v4WXFnKs3e0/qBRCauKu259s58im/4TnT5wyW1rrCCV8Coa9dObKu0x+r7AiznG8iAGJMZCM7mPoLRd1L3FRtHwDDmZsawGuQehBSd/TrY8D9IrimuJCg5ZocK7kgOP+iGvQDSVc+F69z5wUTrbgO2S3q5DwWqPW0OLied7xbJuDPFFmY10LOeiBU6VtBbQ90gCHUkt+43jTNIEhRXyuSIUWDREq2b2DBedFdTEZz8NIpO9wXZf3p3dUMXjDPXU4hP9e2oO2sEMbGfPFM0NSplaFnWDokzprfPwtnDNvhhdZMym74HyK2icyIpOPs4hFsemZZokWYs8OIT+sHt2FWhEIy/ZhnkPQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB2955.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(136003)(366004)(346002)(39860400002)(396003)(107886003)(53546011)(76116006)(64756008)(66476007)(26005)(66446008)(186003)(66946007)(66556008)(4326008)(6506007)(966005)(8936002)(478600001)(7696005)(110136005)(9686003)(71200400001)(8676002)(316002)(2906002)(55016002)(52536014)(83380400001)(33656002)(86362001)(5660300002)(54906003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: 5bsD+Z2GdCQNNTk2JH9l56aMd5pBQSSyuaqZn+h80Ga/l7J3YVYuwbaZlpw02LRctI+N4Pjb321yzTcbArMEJu3NtG1TVwS+MhQxM0ioMBP3ELXnqFeuCoRE2FS2gkd46ZLQh8r84K4FjfPV9oHdDEw9qMJUJK+9AR4BE8AwhwWOx60vUBkGUaY7+1VfSShtAgfJwL47TV5q/0AGej7HgtHB2o7lYWdaRGbQ2aO9/rLz/4saugIT4H4NNMjSx7JePP7BLCaC0BL8kvY6YVXkrIaYl/IhRw+5hlfnd5wEZ6AbKJUsDYIFWwqPIVOPFlBywLIXBSxjEq79AHufMO6CVOETxtrr10pO2wx0cz87uLUG7yRZtG5PtIQzunmPcedMVLyPYGhQkOZ2ntD+PyFjUp1kynt7LAbG2Uxwxx+CylpidYkW++aQTMqt+FNpQNy615a1DfpDir4TCi5m728bsQ2oz8xi+dtv2TA3DHwqp39dExay9aJbqiGuhkDOi38OESnctDGoA7YTysdQx5r+4TcTXkUHbNoknfAVMm3TP7OySGDbWDEz5XumbQWmpv+oYeej1l3cWoL4j7n9Rln6Ml+8FItGf4alVFEmbcGpr3S8JU5hfQFXjdqdWkeQKmmbYR5830pZ3Lv0/dH36dMJ4g== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB2955.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d69367fd-4217-49a6-4db0-08d83e8dff64 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Aug 2020 07:04:46.4751 (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: y6zIla3Pqxdkx/bVDkcoDN1J0GZ9f/5qpExZx5tHKM+otn6U5PawwgZR7pYX/neTc1LBPj6aAQi+wrqSry0zyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4490 Return-Path: guomin.jiang@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Guomin Jiang Thanks Guomin > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Michael > Kubacki > Sent: Wednesday, August 12, 2020 8:24 AM > 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 buil= d > error >=20 > From: Michael Kubacki >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2887 >=20 > The local Private pointer variable in SetTheImage() is initialized based= on the > caller provided This pointer argument. The cleanup label path uses the > Private pointer which will not be initialized if This is NULL. >=20 > This change initializes Private to NULL and accounts for Private potenti= ally > being NULL in the cleanup label path. >=20 > 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(-) >=20 > diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c > b/FmpDevicePkg/FmpDxe/FmpDxe.c index 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 >=20 >=20 >=20