summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg
diff options
context:
space:
mode:
authorPierre Gondois <Pierre.Gondois@arm.com>2020-10-23 14:35:07 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-12-09 15:32:12 +0000
commiteb97f13839fd64ce3e4ff9dd39ea9950db48207d (patch)
tree82d5fee91b60d439430b07ce8275c01020651da0 /ArmPlatformPkg
parentd315bd2286cde306f1ef5256026038e610505cca (diff)
downloadedk2-eb97f13839fd64ce3e4ff9dd39ea9950db48207d.tar.gz
edk2-eb97f13839fd64ce3e4ff9dd39ea9950db48207d.tar.bz2
edk2-eb97f13839fd64ce3e4ff9dd39ea9950db48207d.zip
ArmPlatformPkg: Fix Ecc error 5007 in LcdGraphicsOutputDxe
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>
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r--ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputBlt.c10
-rw-r--r--ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.c10
2 files changed, 12 insertions, 8 deletions
diff --git a/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputBlt.c b/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputBlt.c
index c865215ec6..07d2cb0d5d 100644
--- a/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputBlt.c
+++ b/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputBlt.c
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2011-2013, ARM Ltd. All rights reserved.<BR>
+ Copyright (c) 2011 - 2020, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -36,7 +36,7 @@ VideoCopyNoHorizontalOverlap (
IN UINTN Height
)
{
- EFI_STATUS Status = EFI_SUCCESS;
+ EFI_STATUS Status;
UINTN SourceLine;
UINTN DestinationLine;
UINTN WidthInBytes;
@@ -45,6 +45,8 @@ VideoCopyNoHorizontalOverlap (
VOID *SourceAddr;
VOID *DestinationAddr;
+ Status = EFI_SUCCESS;
+
if( DestinationY <= SourceY ) {
// scrolling up (or horizontally but without overlap)
SourceLine = SourceY;
@@ -128,7 +130,7 @@ VideoCopyHorizontalOverlap (
IN UINTN Height
)
{
- EFI_STATUS Status = EFI_SUCCESS;
+ EFI_STATUS Status;
UINT32 *PixelBuffer32bit;
UINT32 *SourcePixel32bit;
@@ -143,6 +145,8 @@ VideoCopyHorizontalOverlap (
UINTN SizeIn32Bits;
UINTN SizeIn16Bits;
+ Status = EFI_SUCCESS;
+
switch (BitsPerPixel) {
case LCD_BITS_PER_PIXEL_24:
diff --git a/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.c b/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.c
index f1f104858d..bfd03d8f84 100644
--- a/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.c
+++ b/ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.c
@@ -1,7 +1,7 @@
/** @file
This file implements the Graphics Output protocol for Arm platforms
- Copyright (c) 2011-2018, ARM Ltd. All rights reserved.<BR>
+ Copyright (c) 2011 - 2020, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -102,7 +102,7 @@ InitializeDisplay (
IN LCD_INSTANCE* Instance
)
{
- EFI_STATUS Status = EFI_SUCCESS;
+ EFI_STATUS Status;
EFI_PHYSICAL_ADDRESS VramBaseAddress;
UINTN VramSize;
@@ -148,7 +148,7 @@ LcdGraphicsOutputDxeInitialize (
IN EFI_SYSTEM_TABLE *SystemTable
)
{
- EFI_STATUS Status = EFI_SUCCESS;
+ EFI_STATUS Status;
LCD_INSTANCE* Instance;
Status = LcdIdentify ();
@@ -246,7 +246,7 @@ LcdGraphicsQueryMode (
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
)
{
- EFI_STATUS Status = EFI_SUCCESS;
+ EFI_STATUS Status;
LCD_INSTANCE *Instance;
Instance = LCD_INSTANCE_FROM_GOP_THIS (This);
@@ -296,7 +296,7 @@ LcdGraphicsSetMode (
IN UINT32 ModeNumber
)
{
- EFI_STATUS Status = EFI_SUCCESS;
+ EFI_STATUS Status;
EFI_GRAPHICS_OUTPUT_BLT_PIXEL FillColour;
LCD_INSTANCE* Instance;
LCD_BPP Bpp;