summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2024-07-09 19:10:26 -0400
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-07-10 14:32:08 +0000
commit6c061c4715325494b8b25453158166f9032e0335 (patch)
tree1c69b0657672565e146eda21cac175857b972858 /BaseTools
parent3abe627f29add4d05a404e9170b81cf72d9c404b (diff)
downloadedk2-6c061c4715325494b8b25453158166f9032e0335.tar.gz
edk2-6c061c4715325494b8b25453158166f9032e0335.tar.bz2
edk2-6c061c4715325494b8b25453158166f9032e0335.zip
BaseTools/Ecc: Allow `static` as a modifier
Currently, `STATIC` is allowed as a function modifier but `static` results in the below ECC errors: ``` *Error code: 5001 *Return type of a function should exist and in the first line *file: D:\src\edk2\Build\.pytool\Plugin\EccCheck\MdePkg\Library\UefiDebugLibDebugPortProtocol\DebugLibConstructor.c *Line number: 37 *[UefiDebugLibDebugPortProtocolExitBootServicesCallback] Return Type should appear at the start of line EFI coding style error *Error code: 5002 *Any optional functional modifiers should exist and next to the return type *file: D:\src\edk2\Build\.pytool\Plugin\EccCheck\MdePkg\Library\UefiDebugLibDebugPortProtocol\DebugLibConstructor.c *Line number: 37 ``` This is because `GetDataTypeFromModifier()` will return both `static` and the return type (e.g. `VOID`) whereas for a modifier in the list (e.g. `STATIC`) it will return only the return type allowing logic in Ecc/c.py to process the modifier and return type with current logic. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/Ecc/config.ini2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Ecc/config.ini b/BaseTools/Source/Python/Ecc/config.ini
index 5529d0f2db..6edf897ffd 100644
--- a/BaseTools/Source/Python/Ecc/config.ini
+++ b/BaseTools/Source/Python/Ecc/config.ini
@@ -35,7 +35,7 @@ AutoCorrect = 1
#
# List customized Modifer here, split with ','
#
-ModifierList = IN, OUT, OPTIONAL, UNALIGNED, EFI_RUNTIMESERVICE, EFI_BOOTSERVICE, EFIAPI, TPMINTERNALAPI, STATIC
+ModifierList = IN, OUT, OPTIONAL, UNALIGNED, EFI_RUNTIMESERVICE, EFI_BOOTSERVICE, EFIAPI, TPMINTERNALAPI, STATIC, static
#
# General Checking