|
From: <yd...@us...> - 2011-10-10 14:30:16
|
Revision: 2363
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2363&view=rev
Author: ydong10
Date: 2011-10-10 14:30:06 +0000 (Mon, 10 Oct 2011)
Log Message:
-----------
Refine check question id validation logic to avoid label conflict
Signed-off-by: ydong10
Reviewed-by: lgao4
Modified Paths:
--------------
trunk/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
trunk/BaseTools/Source/C/VfrCompile/VfrSyntax.g
Modified: trunk/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
===================================================================
--- trunk/BaseTools/Source/C/VfrCompile/VfrFormPkg.h 2011-10-10 08:20:54 UTC (rev 2362)
+++ trunk/BaseTools/Source/C/VfrCompile/VfrFormPkg.h 2011-10-10 14:30:06 UTC (rev 2363)
@@ -1061,12 +1061,8 @@
mRef2->FormId = FormId;
}
- EFI_VFR_RETURN_CODE SetQuestionId (IN EFI_QUESTION_ID QuestionId) {
- if (QuestionId == EFI_QUESTION_ID_INVALID) {
- return VFR_RETURN_UNDEFINED;
- }
+ VOID SetQuestionId (IN EFI_QUESTION_ID QuestionId) {
mRef2->QuestionId = QuestionId;
- return VFR_RETURN_SUCCESS;
}
};
Modified: trunk/BaseTools/Source/C/VfrCompile/VfrSyntax.g
===================================================================
--- trunk/BaseTools/Source/C/VfrCompile/VfrSyntax.g 2011-10-10 08:20:54 UTC (rev 2362)
+++ trunk/BaseTools/Source/C/VfrCompile/VfrSyntax.g 2011-10-10 14:30:06 UTC (rev 2363)
@@ -1682,8 +1682,13 @@
FormId "=" F3:Number "," << RefType = 2; FId = _STOFID(F3->getText()); >>
Question "="
(
- QN3:StringIdentifier "," << mCVfrQuestionDB.GetQuestionId (QN3->getText (), NULL, QId, BitMask); >>
- | QN3:Number "," << QId = _STOQID(QN3->getText()); >>
+ QN3:StringIdentifier "," <<
+ mCVfrQuestionDB.GetQuestionId (QN3->getText (), NULL, QId, BitMask);
+ if (QId == EFI_QUESTION_ID_INVALID) {
+ _PCATCH(VFR_RETURN_UNDEFINED, QN3);
+ }
+ >>
+ | QN4:Number "," << QId = _STOQID(QN4->getText()); >>
)
)
|
@@ -1730,7 +1735,7 @@
QHObj = R2Obj;
R2Obj->SetLineNo(G->getLine());
R2Obj->SetFormId (FId);
- _PCATCH(R2Obj->SetQuestionId (QId), QN3);
+ R2Obj->SetQuestionId (QId);
break;
}
case 1:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|