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.web09.2926.1582631342327954123 for ; Tue, 25 Feb 2020 03:49:02 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: dandan.bi@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Feb 2020 03:49:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,484,1574150400"; d="scan'208";a="230993367" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga008.jf.intel.com with ESMTP; 25 Feb 2020 03:49:01 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 25 Feb 2020 03:49:00 -0800 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 25 Feb 2020 03:49:00 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.5]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.97]) with mapi id 14.03.0439.000; Tue, 25 Feb 2020 19:48:58 +0800 From: "Dandan Bi" To: Daniel Schaefer , "devel@edk2.groups.io" CC: Abner Chang , Gilbert Chen , Leif Lindholm , "Dong, Eric" Subject: Re: [PATCH 3/3] MdeModulePkg: Use CopyGuid instead of GUID assignment Thread-Topic: [PATCH 3/3] MdeModulePkg: Use CopyGuid instead of GUID assignment Thread-Index: AQHV6aGlXuguvYDWv02aDMMtAzPcY6grzdMQ Date: Tue, 25 Feb 2020 11:48:58 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40D49A17@SHSMSX104.ccr.corp.intel.com> References: <20200222165918.20834-1-daniel.schaefer@hpe.com> <20200222165918.20834-4-daniel.schaefer@hpe.com> In-Reply-To: <20200222165918.20834-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 > -----Original Message----- > From: Daniel Schaefer [mailto:daniel.schaefer@hpe.com] > Sent: Sunday, February 23, 2020 12:59 AM > To: devel@edk2.groups.io > Cc: Abner Chang ; Gilbert Chen > ; Leif Lindholm ; Bi, Dandan > ; Dong, Eric > Subject: [PATCH 3/3] MdeModulePkg: Use CopyGuid 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 > --- > 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..d36648aaa04a 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 > + CopyGuid (&FormSetGuid, &((EFI_IFR_FORM_SET *) Ptr)->Guid); Hi,=20 Could you please use CopyMem instead of CopyGuid? Or it will meet following= warning with VS compiler. DeviceManager.c(622): warning C4366: The result of the unary '&' operator m= ay be unaligned Thanks, Dandan >=20 >=20 >=20 > // >=20 > // Network device process >=20 > -- > 2.25.0