Browse Source

Vlv2TbltDevicePkg/VlvPlatformInitDxe: Avoid memset() intrinsic

VS2017 builds for X64 are failing due to the use of the
memset() intrinsic.  The local variable GopVersion is an
array that is initialed in the declaration.  Update to
use ZeroMem() to initialize 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>
Reviewed-by: Zailiang Sun <Zailiang.sun@intel.com>
Reviewed-by: Gary Lin <glin@suse.com>
Michael D Kinney 4 years ago
parent
commit
44ec9585e8
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c

+ 2 - 1
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);