X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FEcc%2Fc.py;h=1e89f117285ca506e510354f81e9f59418699f26;hp=997e631c97c195357eab18d4622ce9d0575732a3;hb=fa3a21569b05693f414ed39e3acd74e3e58b299c;hpb=fa4470638a4f6ef32bb5eb91ed06c4e7471b8247 diff --git a/BaseTools/Source/Python/Ecc/c.py b/BaseTools/Source/Python/Ecc/c.py index 997e631c97..1e89f11728 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