X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FEcc%2Fc.py;h=a7eefa1e07a446503b6af14f203095ec74934cf8;hp=997e631c97c195357eab18d4622ce9d0575732a3;hb=d77cc2063de7be8a1b28ef2efb5770df4578975a;hpb=83461d2ce88bdeb12b25c74beaca84dcd457e5a3
diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc/c.py
index 997e631c97..a7eefa1e07 100644
--- a/BaseTools/Source/Python/Ecc/c.py
+++ b/BaseTools/Source/Python/Ecc/c.py
@@ -1632,8 +1632,11 @@ def CheckMemberVariableFormat(Name, Value, FileTable, TdId, ModelId):
Field = Field.split('=')[0].strip()
TokenList = Field.split()
# Remove pointers before variable
- if not Pattern.match(TokenList[-1].lstrip('*')):
- ErrMsgList.append(TokenList[-1].lstrip('*'))
+ Token = TokenList[-1]
+ if Token in ['OPTIONAL']:
+ Token = TokenList[-2]
+ if not Pattern.match(Token.lstrip('*')):
+ ErrMsgList.append(Token.lstrip('*'))
return ErrMsgList
@@ -2361,7 +2364,10 @@ def CheckFileHeaderDoxygenComments(FullFileName):
if CommentLine.startswith('Copyright'):
NoCopyrightFlag = False
if CommentLine.find('All rights reserved') == -1:
- PrintErrorMsg(ERROR_HEADER_CHECK_FILE, '""All rights reserved"" announcement should be following the ""Copyright"" at the same line', FileTable, ID)
+ for Copyright in EccGlobalData.gConfig.Copyright:
+ if CommentLine.find(Copyright) > -1:
+ PrintErrorMsg(ERROR_HEADER_CHECK_FILE, '""All rights reserved"" announcement should be following the ""Copyright"" at the same line', FileTable, ID)
+ break
if CommentLine.endswith('
') == -1:
PrintErrorMsg(ERROR_HEADER_CHECK_FILE, 'The ""
"" at the end of the Copyright line is required', FileTable, ID)
if NextLineIndex < len(CommentStrList) and CommentStrList[NextLineIndex].strip().startswith('Copyright') == False and CommentStrList[NextLineIndex].strip():