diff --git a/ArmPkg/Drivers/ArmScmiDxe/Scmi.c b/ArmPkg/Drivers/ArmScmiDxe/Scmi.c index c4af3ec4ec..847868a774 100644 --- a/ArmPkg/Drivers/ArmScmiDxe/Scmi.c +++ b/ArmPkg/Drivers/ArmScmiDxe/Scmi.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 @@ -161,8 +161,9 @@ ScmiProtocolDiscoveryCommon ( ) { SCMI_COMMAND Command; - UINT32 PayloadLength = 0; + UINT32 PayloadLength; + PayloadLength = 0; Command.ProtocolId = ProtocolId; Command.MessageId = MessageId; 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)) {