From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.3092.1583368792136025961 for ; Wed, 04 Mar 2020 16:39:52 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: dandan.bi@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Mar 2020 16:39:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,516,1574150400"; d="scan'208";a="263796692" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 04 Mar 2020 16:39:51 -0800 Received: from fmsmsx161.amr.corp.intel.com (10.18.125.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 4 Mar 2020 16:39:51 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX161.amr.corp.intel.com (10.18.125.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 4 Mar 2020 16:39:51 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.206]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.43]) with mapi id 14.03.0439.000; Thu, 5 Mar 2020 08:39:49 +0800 From: "Dandan Bi" To: Daniel Schaefer , "devel@edk2.groups.io" CC: Abner Chang , Gilbert Chen , Leif Lindholm , "Dong, Eric" Subject: Re: [PATCH v2 3/3] MdeModulePkg: Use CopyMem instead of GUID assignment Thread-Topic: [PATCH v2 3/3] MdeModulePkg: Use CopyMem instead of GUID assignment Thread-Index: AQHV8H4BW5unPKNjMkOWPv3UGURnmag5LBbg Date: Thu, 5 Mar 2020 00:39:48 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40D6BDA4@SHSMSX104.ccr.corp.intel.com> References: <20200302103238.25726-1-daniel.schaefer@hpe.com> <20200302103238.25726-4-daniel.schaefer@hpe.com> In-Reply-To: <20200302103238.25726-4-daniel.schaefer@hpe.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: dandan.bi@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Dandan Bi Thanks, Dandan > -----Original Message----- > From: Daniel Schaefer [mailto:daniel.schaefer@hpe.com] > Sent: Monday, March 2, 2020 6:33 PM > To: devel@edk2.groups.io > Cc: Abner Chang ; Gilbert Chen > ; Leif Lindholm ; Bi, Dandan > ; Dong, Eric > Subject: [PATCH v2 3/3] MdeModulePkg: Use CopyMem instead of GUID > assignment >=20 > GCC translates a simple assignment to memcpy, which EDKII doesn't provide= . > See: https://www.mail-archive.com/edk2-devel@lists.01.org/msg11928.html >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2547 >=20 > Signed-off-by: Daniel Schaefer > Cc: Abner Chang > Cc: Gilbert Chen > Cc: Leif Lindholm > Cc: Dandan Bi > Cc: Eric Dong > --- >=20 > Notes: > v2: > - Use CopyMem instead of CopyGuid [Dandan] >=20 > MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c > b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c > index 5cc527679a78..0540e6fa8a44 100644 > --- a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c > +++ b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c > @@ -619,7 +619,7 @@ CreateDeviceManagerForm( > TokenHelp =3D HiiSetString (HiiHandle, 0, String, NULL); >=20 > FreePool (String); >=20 >=20 >=20 > - FormSetGuid =3D ((EFI_IFR_FORM_SET *)Ptr)->Guid; >=20 > + CopyMem (&FormSetGuid, &((EFI_IFR_FORM_SET *) Ptr)->Guid, sizeof > (EFI_GUID)); >=20 >=20 >=20 > // >=20 > // Network device process >=20 > -- > 2.25.0