]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg: Fix Ecc error 5007 in NorFlashDxe
authorPierre Gondois <Pierre.Gondois@arm.com>
Fri, 23 Oct 2020 13:35:36 +0000 (14:35 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 9 Dec 2020 15:32:12 +0000 (15:32 +0000)
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 <Pierre.Gondois@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c

index b681c4b4668630de8a9585363a328b3e3f1bc324..20134094badcb5bee14f66a9c38b8d5bbf68ceaa 100644 (file)
@@ -676,12 +676,14 @@ NorFlashWriteBlocks (
   )\r
 {\r
   UINT32          *pWriteBuffer;\r
-  EFI_STATUS      Status = EFI_SUCCESS;\r
+  EFI_STATUS      Status;\r
   EFI_LBA         CurrentBlock;\r
   UINT32          BlockSizeInWords;\r
   UINT32          NumBlocks;\r
   UINT32          BlockCount;\r
 \r
+  Status = EFI_SUCCESS;\r
+\r
   // The buffer must be valid\r
   if (Buffer == NULL) {\r
     return EFI_INVALID_PARAMETER;\r