[edk2-devel] [PATCH 13/13] BhyvePkg: fix BhyveSetGraphicsMode call for VS2019 build

Rebecca Cran posted 13 patches 5 years, 9 months ago
[edk2-devel] [PATCH 13/13] BhyvePkg: fix BhyveSetGraphicsMode call for VS2019 build
Posted by Rebecca Cran 5 years, 9 months ago
The VS2019 toolchain warns about casts from UINT32 to UINT16.
Work around this by adding casts in the call to BhyveSetGraphicsMode, as
a temporary measure.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
 BhyvePkg/BhyveRfbDxe/GopScreen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BhyvePkg/BhyveRfbDxe/GopScreen.c b/BhyvePkg/BhyveRfbDxe/GopScreen.c
index 6e5ccce0b3..a5e9f56da7 100644
--- a/BhyvePkg/BhyveRfbDxe/GopScreen.c
+++ b/BhyvePkg/BhyveRfbDxe/GopScreen.c
@@ -184,7 +184,7 @@ EmuGopSetMode (
   This->Mode->FrameBufferSize = Private->FbSize;
   DEBUG ((DEBUG_INFO, "BHYVE GOP FrameBufferBase: 0x%x, FrameBufferSize: 0x%x\n", This->Mode->FrameBufferBase, This->Mode->FrameBufferSize));
 
-  BhyveSetGraphicsMode(Private, ModeData->HorizontalResolution, ModeData->VerticalResolution, ModeData->ColorDepth);
+  BhyveSetGraphicsMode(Private, (UINT16)ModeData->HorizontalResolution, (UINT16)ModeData->VerticalResolution, (UINT16)ModeData->ColorDepth);
 
   RETURN_STATUS ret = FrameBufferBltConfigure (
     (VOID*)(UINTN) This->Mode->FrameBufferBase,
-- 
2.26.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#57446): https://edk2.groups.io/g/devel/message/57446
Mute This Topic: https://groups.io/mt/73045169/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-