summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c
diff options
context:
space:
mode:
authorPierre Gondois <Pierre.Gondois@arm.com>2020-12-10 13:05:24 +0000
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-01-06 16:22:54 +0000
commit3f0d3dfa0ec475912095456dd5dd3d8750028ae4 (patch)
tree76b0c99f330986e27dd6f4bd69ccc1ca36e7447b /ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c
parentfb48f1e2980bcca8fe75d30cacc73c6e00b109b8 (diff)
downloadedk2-3f0d3dfa0ec475912095456dd5dd3d8750028ae4.tar.gz
edk2-3f0d3dfa0ec475912095456dd5dd3d8750028ae4.tar.bz2
edk2-3f0d3dfa0ec475912095456dd5dd3d8750028ae4.zip
ArmPkg: Fix Ecc error 5007 in ArmScmiDxe
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 'ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c')
-rw-r--r--ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c b/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c
index ac0d21d862..c66c414385 100644
--- a/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c
+++ b/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2017-2018, Arm Limited. All rights reserved.
+ Copyright (c) 2017-2021, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -189,12 +189,14 @@ ClockDescribeRates (
CLOCK_DESCRIBE_RATES *DescribeRates;
CLOCK_RATE_DWORD *Rate;
- UINT32 RequiredArraySize = 0;
- UINT32 RateIndex = 0;
+ UINT32 RequiredArraySize;
+ UINT32 RateIndex;
UINT32 RateNo;
UINT32 RateOffset;
*TotalRates = 0;
+ RequiredArraySize = 0;
+ RateIndex = 0;
Status = ScmiCommandGetPayload (&MessageParams);
if (EFI_ERROR (Status)) {