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.
This is intended to allow static and STATIC for a period of time until all code is updated to use static.
Description
Currently,
STATIC
is allowed as a function modifier butstatic
results in the below ECC errors:This is because
GetDataTypeFromModifier()
will return bothstatic
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.This is intended to allow
static
andSTATIC
for a period of time until all code is updated to usestatic
.How This Was Tested
static
andSTATIC
Integration Instructions
N/A