diff options
author | Hess Chen <hesheng.chen@intel.com> | 2015-08-24 02:53:27 +0000 |
---|---|---|
committer | hchen30 <hchen30@Edk2> | 2015-08-24 02:53:27 +0000 |
commit | 72358997e75006fe024133a75478344c0fa7f3ff (patch) | |
tree | 68c4facd695eb285a95f7668935504fd6ad69329 /BaseTools | |
parent | 28fc9f4730bc36d2a7f74c9ccf270c009a7641b8 (diff) | |
download | edk2-platforms-72358997e75006fe024133a75478344c0fa7f3ff.tar.xz |
BaseTools/Ecc: Remove checkpoint for STATIC modifier
Remove checkpoint for STATIC modifier to allow this usage
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: YangX Li <yangx.li@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18264 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools')
-rw-r--r-- | BaseTools/Source/Python/Ecc/c.py | 13 | ||||
-rw-r--r-- | BaseTools/Source/Python/Ecc/config.ini | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc/c.py index a7eefa1e07..dcb37e5632 100644 --- a/BaseTools/Source/Python/Ecc/c.py +++ b/BaseTools/Source/Python/Ecc/c.py @@ -1289,13 +1289,13 @@ def CheckFuncLayoutReturnType(FullFileName): FuncName = Result[5]
if EccGlobalData.gException.IsException(ERROR_C_FUNCTION_LAYOUT_CHECK_RETURN_TYPE, FuncName):
continue
- Index = Result[0].find(ReturnType)
+ Result0 = Result[0]
+ if Result0.upper().startswith('STATIC'):
+ Result0 = Result0[6:].strip()
+ Index = Result0.find(ReturnType)
if Index != 0 or Result[3] != 0:
PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_RETURN_TYPE, '[%s] Return Type should appear at the start of line' % FuncName, 'Function', Result[1])
- if Result[2] == Result[4]:
- PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_RETURN_TYPE, '[%s] Return Type should appear on its own line' % FuncName, 'Function', Result[1])
-
def CheckFuncLayoutModifier(FullFileName):
ErrorMsgList = []
@@ -1329,7 +1329,10 @@ def CheckFuncLayoutModifier(FullFileName): TypeStart = ReturnType.split()[0]
# if len(ReturnType) == 0:
# continue
- Index = Result[0].find(TypeStart)
+ Result0 = Result[0]
+ if Result0.upper().startswith('STATIC'):
+ Result0 = Result0[6:].strip()
+ Index = Result0.find(TypeStart)
if Index != 0:
PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_OPTIONAL_FUNCTIONAL_MODIFIER, '', 'Function', Result[1])
diff --git a/BaseTools/Source/Python/Ecc/config.ini b/BaseTools/Source/Python/Ecc/config.ini index b3c1204aed..e3481251af 100644 --- a/BaseTools/Source/Python/Ecc/config.ini +++ b/BaseTools/Source/Python/Ecc/config.ini @@ -41,7 +41,7 @@ AutoCorrect = 1 #
# List customized Modifer here, split with ','
#
-ModifierList = IN, OUT, OPTIONAL, UNALIGNED, EFI_RUNTIMESERVICE, EFI_BOOTSERVICE, EFIAPI, TPMINTERNALAPI
+ModifierList = IN, OUT, OPTIONAL, UNALIGNED, EFI_RUNTIMESERVICE, EFI_BOOTSERVICE, EFIAPI, TPMINTERNALAPI, STATIC
#
# General Checking
|