public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: devel@edk2.groups.io
Cc: Zailiang Sun <zailiang.sun@intel.com>, Gary Lin <glin@suse.com>
Subject: [Patch] Vlv2TbltDevicePkg/VlvPlatformInitDxe: Avoid memset instrinsic
Date: Fri,  9 Aug 2019 14:23:48 -0700	[thread overview]
Message-ID: <20190809212348.12492-1-michael.d.kinney@intel.com> (raw)

VS2017 builds for X64 are failing due to the use of the
memset intrinsic.  The local variable GopVersion is an
array that is initialied in the declaration.  Update to
use ZeroMem() to intialize GopVersion.

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Gary Lin <glin@suse.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c
index fcd9e566ae..3815c8fa9c 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c
+++ b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c
@@ -493,9 +493,10 @@ SetGOPVersionCallback (
   IN VOID      *Context
   )
 {
-  CHAR16                GopVersion[16] = {0};
+  CHAR16                GopVersion[16];
   EFI_STATUS            Status;
 
+  ZeroMem (GopVersion, sizeof (GopVersion));
   Status = GetGOPDriverVersion(GopVersion);
   if(!EFI_ERROR(Status)) {
     StrCpy((CHAR16*)&(mIgdOpRegion.OpRegion->Header.GOPV[0]), GopVersion);
-- 
2.21.0.windows.1


             reply	other threads:[~2019-08-09 21:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09 21:23 Michael D Kinney [this message]
2019-08-11 15:37 ` [Patch] Vlv2TbltDevicePkg/VlvPlatformInitDxe: Avoid memset instrinsic Sun, Zailiang
2019-08-12  2:35 ` Gary Lin

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=20190809212348.12492-1-michael.d.kinney@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