summaryrefslogtreecommitdiffstats
path: root/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm
diff options
context:
space:
mode:
authorSami Mujawar <sami.mujawar@arm.com>2020-09-21 16:57:59 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-10-21 13:33:03 +0000
commit324931009e68b5019b2eafe57f3726825de01331 (patch)
tree91224d4f54f2531baff6e853b3d18b07ca47dda2 /DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm
parent653fb710ce2de21544e38ae81941eba01c94426a (diff)
downloadedk2-324931009e68b5019b2eafe57f3726825de01331.tar.gz
edk2-324931009e68b5019b2eafe57f3726825de01331.tar.bz2
edk2-324931009e68b5019b2eafe57f3726825de01331.zip
DynamicTablesPkg: SsdtSerialPortLibArm fix ECC error
Fix the following ECC reported error in SsdtSerialPortLibArm. - [5007] There should be no initialization of a variable as part of its declaration Variable Name. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Diffstat (limited to 'DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm')
-rw-r--r--DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c
index a705d771be..6a1e7487df 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c
@@ -171,7 +171,7 @@ BuildSsdtSerialPortTableEx (
CM_ARM_SERIAL_PORT_INFO * SerialPortInfo;
UINT32 SerialPortCount;
UINTN Index;
- CHAR8 NewName[] = "COMx";
+ CHAR8 NewName[5];
UINT64 Uid;
EFI_ACPI_DESCRIPTION_HEADER ** TableList;
@@ -243,6 +243,10 @@ BuildSsdtSerialPortTableEx (
// can be done in case of failure.
*Table = TableList;
+ NewName[0] = 'C';
+ NewName[1] = 'O';
+ NewName[2] = 'M';
+ NewName[4] = '\0';
for (Index = 0; Index < SerialPortCount; Index++) {
Uid = SERIAL_PORT_START_UID + Index;
NewName[3] = AsciiFromHex ((UINT8)(Uid));