mirror of https://github.com/acidanthera/audk.git
ArmPkg: Fix Ecc error 5007 in ArmCacheMaintenanceLib
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:
parent
88a7d4aa30
commit
15f5b04e43
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||||
Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.
|
Copyright (c) 2011 - 2021, ARM Limited. All rights reserved.
|
||||||
|
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
|
@ -20,11 +20,14 @@ CacheRangeOperation (
|
||||||
IN UINTN LineLength
|
IN UINTN LineLength
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINTN ArmCacheLineAlignmentMask = LineLength - 1;
|
UINTN ArmCacheLineAlignmentMask;
|
||||||
|
|
||||||
// Align address (rounding down)
|
// Align address (rounding down)
|
||||||
UINTN AlignedAddress = (UINTN)Start - ((UINTN)Start & ArmCacheLineAlignmentMask);
|
UINTN AlignedAddress;
|
||||||
UINTN EndAddress = (UINTN)Start + Length;
|
UINTN EndAddress;
|
||||||
|
|
||||||
|
ArmCacheLineAlignmentMask = LineLength - 1;
|
||||||
|
AlignedAddress = (UINTN)Start - ((UINTN)Start & ArmCacheLineAlignmentMask);
|
||||||
|
EndAddress = (UINTN)Start + Length;
|
||||||
|
|
||||||
// Perform the line operation on an address in each cache line
|
// Perform the line operation on an address in each cache line
|
||||||
while (AlignedAddress < EndAddress) {
|
while (AlignedAddress < EndAddress) {
|
||||||
|
|
Loading…
Reference in New Issue