From: "Dandan Bi" <dandan.bi@intel.com>
To: Daniel Schaefer <daniel.schaefer@hpe.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Abner Chang <abner.chang@hpe.com>,
Gilbert Chen <gilbert.chen@hpe.com>,
Leif Lindholm <leif@nuviainc.com>,
"Dong, Eric" <eric.dong@intel.com>
Subject: Re: [PATCH 3/3] MdeModulePkg: Use CopyGuid instead of GUID assignment
Date: Tue, 25 Feb 2020 11:48:58 +0000 [thread overview]
Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40D49A17@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20200222165918.20834-4-daniel.schaefer@hpe.com>
> -----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 <abner.chang@hpe.com>; Gilbert Chen
> <gilbert.chen@hpe.com>; Leif Lindholm <leif@nuviainc.com>; Bi, Dandan
> <dandan.bi@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: [PATCH 3/3] MdeModulePkg: Use CopyGuid instead of GUID
> assignment
>
> 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
>
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2547
>
> Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com>
> Cc: Abner Chang <abner.chang@hpe.com>
> Cc: Gilbert Chen <gilbert.chen@hpe.com>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Dandan Bi <dandan.bi@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> ---
> MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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 = HiiSetString (HiiHandle, 0, String, NULL);
>
> FreePool (String);
>
>
>
> - FormSetGuid = ((EFI_IFR_FORM_SET *)Ptr)->Guid;
>
> + CopyGuid (&FormSetGuid, &((EFI_IFR_FORM_SET *) Ptr)->Guid);
Hi,
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 may be unaligned
Thanks,
Dandan
>
>
>
> //
>
> // Network device process
>
> --
> 2.25.0
prev parent reply other threads:[~2020-02-25 11:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-22 16:59 [PATCH 0/3] Allow building MdeModulePkg on non-x86 Schaefer, Daniel Helmut (DualStudy)
2020-02-22 16:59 ` [PATCH 1/3] MdeModulePkg: Restrict libraries using SMM to x86 Schaefer, Daniel Helmut (DualStudy)
2020-02-24 0:48 ` [edk2-devel] " Michael D Kinney
2020-02-22 16:59 ` [PATCH 2/3] MdeModulePkg: Set PcdDxeIplSwitchToLongMode false on non-x86 Schaefer, Daniel Helmut (DualStudy)
2020-02-22 16:59 ` [PATCH 3/3] MdeModulePkg: Use CopyGuid instead of GUID assignment Schaefer, Daniel Helmut (DualStudy)
2020-02-25 11:48 ` Dandan Bi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C0D5C461C9E904E8F62152F6274C0BB40D49A17@SHSMSX104.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox