OvmfPkg/VirtioGpuDxe: Fix VS toolchain build failure

V2: add the assert codes.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
[lersek@redhat.com: fix up subject line]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Dandan Bi 2016-09-22 09:21:38 +08:00 committed by Laszlo Ersek
parent 5919a9600e
commit 7f1bf51bdb
1 changed files with 2 additions and 1 deletions

View File

@ -284,12 +284,13 @@ VirtioGpuSendCommand (
Header->Padding = 0;
ASSERT (RequestSize >= sizeof *Header);
ASSERT (RequestSize <= MAX_UINT32);
//
// Compose the descriptor chain.
//
VirtioPrepare (&VgpuDev->Ring, &Indices);
VirtioAppendDesc (&VgpuDev->Ring, (UINTN)Header, RequestSize,
VirtioAppendDesc (&VgpuDev->Ring, (UINTN)Header, (UINT32)RequestSize,
VRING_DESC_F_NEXT, &Indices);
VirtioAppendDesc (&VgpuDev->Ring, (UINTN)&Response, sizeof Response,
VRING_DESC_F_WRITE, &Indices);