From 3ca7326b37c5d20d9473f47266074e61ea384c5b Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 30 May 2022 11:22:55 +0200 Subject: [PATCH] OvmfPkg/VirtioGpuDxe: replace struct copy with CopyMem call Buildfix for `-t CLANG38 -b NOOPT -p OvmfPkg/OvmfPkgX64.dsc`. Fixes: 5f6ecaa398ba ("OvmfPkg/VirtioGpuDxe: use GopQueryMode in GopSetMode") Reported-by: Rebecca Cran Signed-off-by: Gerd Hoffmann --- OvmfPkg/VirtioGpuDxe/Gop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OvmfPkg/VirtioGpuDxe/Gop.c b/OvmfPkg/VirtioGpuDxe/Gop.c index 70a81c10c8..401db47672 100644 --- a/OvmfPkg/VirtioGpuDxe/Gop.c +++ b/OvmfPkg/VirtioGpuDxe/Gop.c @@ -509,7 +509,7 @@ GopSetMode ( // Populate Mode and ModeInfo (mutable fields only). // VgpuGop->GopMode.Mode = ModeNumber; - VgpuGop->GopModeInfo = *GopModeInfo; + CopyMem (&VgpuGop->GopModeInfo, GopModeInfo, sizeof VgpuGop->GopModeInfo); FreePool (GopModeInfo); return EFI_SUCCESS;