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>
This commit is contained in:
Pierre Gondois 2020-12-10 13:05:24 +00:00 committed by mergify[bot]
parent fb48f1e298
commit 3f0d3dfa0e
2 changed files with 8 additions and 5 deletions

View File

@ -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
@ -161,8 +161,9 @@ ScmiProtocolDiscoveryCommon (
)
{
SCMI_COMMAND Command;
UINT32 PayloadLength = 0;
UINT32 PayloadLength;
PayloadLength = 0;
Command.ProtocolId = ProtocolId;
Command.MessageId = MessageId;

View File

@ -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)) {