diff options
author | Jeff Fan <jeff.fan@intel.com> | 2015-11-16 05:29:49 +0000 |
---|---|---|
committer | vanjeff <vanjeff@Edk2> | 2015-11-16 05:29:49 +0000 |
commit | af7fca3649779f0e55220a7acda9bd11bc660fc3 (patch) | |
tree | 02585c606e356ce06fefa9ff80bc4529fcde256e /BaseTools/Source/Python/Ecc/c.py | |
parent | 59fd15c5a2174a6a6fc4133964e6d5b520b58663 (diff) | |
download | edk2-platforms-af7fca3649779f0e55220a7acda9bd11bc660fc3.tar.xz |
Update BaseTools from main trunk r18767.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@18784 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/Ecc/c.py')
-rw-r--r-- | BaseTools/Source/Python/Ecc/c.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc/c.py index dcb37e5632..256b9e021c 100644 --- a/BaseTools/Source/Python/Ecc/c.py +++ b/BaseTools/Source/Python/Ecc/c.py @@ -1271,7 +1271,10 @@ def CheckFuncLayoutReturnType(FullFileName): FuncName = Result[5]
if EccGlobalData.gException.IsException(ERROR_C_FUNCTION_LAYOUT_CHECK_RETURN_TYPE, FuncName):
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 or Result[3] != 0:
PrintErrorMsg(ERROR_C_FUNCTION_LAYOUT_CHECK_RETURN_TYPE, '[%s] Return Type should appear at the start of line' % FuncName, FileTable, Result[1])
@@ -1313,9 +1316,10 @@ def CheckFuncLayoutModifier(FullFileName): for Result in ResultSet:
ReturnType = GetDataTypeFromModifier(Result[0])
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, '', FileTable, Result[1])
@@ -1327,8 +1331,6 @@ def CheckFuncLayoutModifier(FullFileName): for Result in ResultSet:
ReturnType = GetDataTypeFromModifier(Result[0])
TypeStart = ReturnType.split()[0]
-# if len(ReturnType) == 0:
-# continue
Result0 = Result[0]
if Result0.upper().startswith('STATIC'):
Result0 = Result0[6:].strip()
@@ -1631,6 +1633,8 @@ def CheckMemberVariableFormat(Name, Value, FileTable, TdId, ModelId): Field = Field.strip()
if Field == '':
continue
+ if Field.startswith("#"):
+ continue
# Enum could directly assign value to variable
Field = Field.split('=')[0].strip()
TokenList = Field.split()
|