.../Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
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
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#45292): https://edk2.groups.io/g/devel/message/45292
Mute This Topic: https://groups.io/mt/32815340/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
On Fri, Aug 09, 2019 at 02:23:48PM -0700, Kinney, Michael D wrote: > 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. > Looks reasonable to me. Reviewed-by: Gary Lin <glin@suse.com> > 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 > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#45347): https://edk2.groups.io/g/devel/message/45347 Mute This Topic: https://groups.io/mt/32815340/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Zailiang Sun <Zailiang.sun@intel.com> > -----Original Message----- > From: Kinney, Michael D > Sent: Saturday, August 10, 2019 5:24 AM > To: devel@edk2.groups.io > Cc: Sun, Zailiang <zailiang.sun@intel.com>; Gary Lin <glin@suse.com> > Subject: [Patch] Vlv2TbltDevicePkg/VlvPlatformInitDxe: Avoid memset instrinsic > > 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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#45320): https://edk2.groups.io/g/devel/message/45320 Mute This Topic: https://groups.io/mt/32815340/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.