summaryrefslogtreecommitdiffstats
path: root/ArmPkg
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Library/SemiHostingSerialPortLib/SerialPortLib.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ArmPkg/Library/SemiHostingSerialPortLib/SerialPortLib.c b/ArmPkg/Library/SemiHostingSerialPortLib/SerialPortLib.c
index 7e5c61fad4..e35bcee380 100644
--- a/ArmPkg/Library/SemiHostingSerialPortLib/SerialPortLib.c
+++ b/ArmPkg/Library/SemiHostingSerialPortLib/SerialPortLib.c
@@ -2,6 +2,7 @@
Serial I/O Port library functions with no library constructor/destructor
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
+ Copyright (c) 2021, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -55,10 +56,13 @@ SerialPortWrite (
)
{
UINT8 PrintBuffer[PRINT_BUFFER_SIZE];
- UINTN SourceIndex = 0;
- UINTN DestinationIndex = 0;
+ UINTN SourceIndex;
+ UINTN DestinationIndex;
UINT8 CurrentCharacter;
+ SourceIndex = 0;
+ DestinationIndex = 0;
+
while (SourceIndex < NumberOfBytes)
{
CurrentCharacter = Buffer[SourceIndex++];