From 4c7e107810cacd1dbd4c6f7d6d4d22e3de2f8db1 Mon Sep 17 00:00:00 2001 From: Pierre Gondois Date: Fri, 23 Oct 2020 14:35:36 +0100 Subject: [PATCH] ArmPlatformPkg: Fix Ecc error 5007 in NorFlashDxe This patch fixes the following Ecc reported error: There should be no initialization of a variable as part of its declaration Signed-off-by: Pierre Gondois Reviewed-by: Ard Biesheuvel --- ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c index b681c4b466..20134094ba 100644 --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c @@ -676,12 +676,14 @@ NorFlashWriteBlocks ( ) { UINT32 *pWriteBuffer; - EFI_STATUS Status = EFI_SUCCESS; + EFI_STATUS Status; EFI_LBA CurrentBlock; UINT32 BlockSizeInWords; UINT32 NumBlocks; UINT32 BlockCount; + Status = EFI_SUCCESS; + // The buffer must be valid if (Buffer == NULL) { return EFI_INVALID_PARAMETER; -- 2.39.2