diff options
author | Hess Chen <hesheng.chen@intel.com> | 2018-10-16 16:21:48 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-10-24 08:41:04 +0800 |
commit | 3a244b8db4e76a7c945b58f49746152dd8787172 (patch) | |
tree | 06532348741e73d573d9ac8737af8aee52793968 /BaseTools/Source/Python/Ecc/c.py | |
parent | 33a211d0095575b35cba16a1a8c305588bf1d49a (diff) | |
download | edk2-3a244b8db4e76a7c945b58f49746152dd8787172.tar.gz edk2-3a244b8db4e76a7c945b58f49746152dd8787172.tar.bz2 edk2-3a244b8db4e76a7c945b58f49746152dd8787172.zip |
BaseTools/ECC: Fix an identification issue of typedef function.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Ecc/c.py')
-rw-r--r-- | BaseTools/Source/Python/Ecc/c.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc/c.py index 953f1630b6..b8d6adde16 100644 --- a/BaseTools/Source/Python/Ecc/c.py +++ b/BaseTools/Source/Python/Ecc/c.py @@ -2144,7 +2144,7 @@ def CheckBooleanValueComparison(FullFileName): PrintErrorMsg(ERROR_PREDICATE_EXPRESSION_CHECK_BOOLEAN_VALUE, 'Predicate Expression: %s' % Exp, FileTable, Str[2])
-def CheckHeaderFileData(FullFileName):
+def CheckHeaderFileData(FullFileName, AllTypedefFun=[]):
ErrorMsgList = []
FileID = GetTableID(FullFileName, ErrorMsgList)
@@ -2160,7 +2160,11 @@ def CheckHeaderFileData(FullFileName): ResultSet = Db.TblFile.Exec(SqlStatement)
for Result in ResultSet:
if not Result[1].startswith('extern'):
- PrintErrorMsg(ERROR_INCLUDE_FILE_CHECK_DATA, 'Variable definition appears in header file', FileTable, Result[0])
+ for Item in AllTypedefFun:
+ if '(%s)' % Result[1] in Item:
+ break
+ else:
+ PrintErrorMsg(ERROR_INCLUDE_FILE_CHECK_DATA, 'Variable definition appears in header file', FileTable, Result[0])
SqlStatement = """ select ID
from Function
|