From 9c4eef656fa3ea455125abc66780942780b46f85 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Thu, 18 May 2017 14:48:13 +0200 Subject: OvmfPkg/EmuVariableFvbRuntimeDxe: correct NumOfLba vararg type in EraseBlocks() According to the PI spec, Volume 3, EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL.EraseBlocks(): > The variable argument list is a list of tuples. Each tuple describes a > range of LBAs to erase and consists of the following: > * An EFI_LBA that indicates the starting LBA > * A UINTN that indicates the number of blocks to erase (NB, in edk2, EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL is a typedef to EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL.) In this driver, the NumOfLba local variable is defined with type UINTN, but the TYPE argument passed to VA_ARG() is UINT32. Fix the mismatch. Cc: Jordan Justen Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Jordan Justen --- OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OvmfPkg/EmuVariableFvbRuntimeDxe') diff --git a/OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.c b/OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.c index 7a6d3153ec..9f9babc9cc 100644 --- a/OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.c +++ b/OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.c @@ -340,7 +340,7 @@ FvbProtocolEraseBlocks ( break; } - NumOfLba = VA_ARG (args, UINT32); + NumOfLba = VA_ARG (args, UINTN); // // Check input parameters -- cgit v1.2.3