summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrError.cpp1
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrError.h1
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrSyntax.g7
3 files changed, 9 insertions, 0 deletions
diff --git a/BaseTools/Source/C/VfrCompile/VfrError.cpp b/BaseTools/Source/C/VfrCompile/VfrError.cpp
index ffed732a41..b5167e515d 100644
--- a/BaseTools/Source/C/VfrCompile/VfrError.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrError.cpp
@@ -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" }
};
diff --git a/BaseTools/Source/C/VfrCompile/VfrError.h b/BaseTools/Source/C/VfrCompile/VfrError.h
index 622cba6cbe..c0b4ec64a2 100644
--- a/BaseTools/Source/C/VfrCompile/VfrError.h
+++ b/BaseTools/Source/C/VfrCompile/VfrError.h
@@ -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;
diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
index a38f770e3b..5da87675ae 100644
--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
@@ -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());