summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Ecc/c.py
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/Ecc/c.py')
-rw-r--r--BaseTools/Source/Python/Ecc/c.py7
1 files changed, 5 insertions, 2 deletions
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