Report warning info if an action opcode has text two statement.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15682 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Eric Dong 2014-07-25 21:09:48 +00:00 committed by jljusten
parent 17e59b3346
commit 1d218f83f1
3 changed files with 9 additions and 0 deletions

View File

@ -52,6 +52,7 @@ static SVFR_ERROR_HANDLE VFR_ERROR_HANDLE_TABLE [] = {
static SVFR_WARNING_HANDLE VFR_WARNING_HANDLE_TABLE [] = {
{ VFR_WARNING_DEFAULT_VALUE_REDEFINED, ": default value re-defined with different value"},
{ VFR_WARNING_STRING_TO_UINT_OVERFLOW, ": String to UINT* Overflow"},
{ VFR_WARNING_ACTION_WITH_TEXT_TWO, ": Action opcode should not have TextTwo part"},
{ VFR_WARNING_CODEUNDEFINED, ": undefined Warning Code" }
};

View File

@ -50,6 +50,7 @@ typedef enum {
typedef enum {
VFR_WARNING_DEFAULT_VALUE_REDEFINED = 0,
VFR_WARNING_STRING_TO_UINT_OVERFLOW,
VFR_WARNING_ACTION_WITH_TEXT_TWO,
VFR_WARNING_CODEUNDEFINED
} EFI_VFR_WARNING_CODE;

View File

@ -1685,6 +1685,13 @@ vfrStatementStaticText :
}
<<
if (Flags & EFI_IFR_FLAG_CALLBACK) {
if (TxtTwo != EFI_STRING_ID_INVALID) {
gCVfrErrorHandle.HandleWarning (
VFR_WARNING_ACTION_WITH_TEXT_TWO,
S3->getLine(),
S3->getText()
);
}
CIfrAction AObj;
mCVfrQuestionDB.RegisterQuestion (NULL, NULL, QId);
AObj.SetLineNo (F->getLine());