Revision: 18264
http://sourceforge.net/p/edk2/code/18264
Author: hchen30
Date: 2015-08-24 02:53:27 +0000 (Mon, 24 Aug 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: YangX Li <[email protected]>
Modified Paths:
--------------
trunk/edk2/BaseTools/Source/Python/Ecc/c.py
trunk/edk2/BaseTools/Source/Python/Ecc/config.ini
Modified: trunk/edk2/BaseTools/Source/Python/Ecc/c.py
===================================================================
--- trunk/edk2/BaseTools/Source/Python/Ecc/c.py 2015-08-24 01:43:20 UTC (rev
18263)
+++ trunk/edk2/BaseTools/Source/Python/Ecc/c.py 2015-08-24 02:53:27 UTC (rev
18264)
@@ -1289,13 +1289,13 @@
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 @@
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])
Modified: trunk/edk2/BaseTools/Source/Python/Ecc/config.ini
===================================================================
--- trunk/edk2/BaseTools/Source/Python/Ecc/config.ini 2015-08-24 01:43:20 UTC
(rev 18263)
+++ trunk/edk2/BaseTools/Source/Python/Ecc/config.ini 2015-08-24 02:53:27 UTC
(rev 18264)
@@ -41,7 +41,7 @@
#
# 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
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits