summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrError.cpp2
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrError.h2
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrSyntax.g10
3 files changed, 7 insertions, 7 deletions
diff --git a/BaseTools/Source/C/VfrCompile/VfrError.cpp b/BaseTools/Source/C/VfrCompile/VfrError.cpp
index bbf738c..c105d73 100644
--- a/BaseTools/Source/C/VfrCompile/VfrError.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrError.cpp
@@ -47,12 +47,12 @@ static SVFR_ERROR_HANDLE VFR_ERROR_HANDLE_TABLE [] = {
{ VFR_RETURN_CONSTANT_ONLY, ": only constant is allowed in the expression"},
{ VFR_RETURN_VARSTORE_NAME_REDEFINED_ERROR, ": Varstore name is defined by more than one varstores, it can't be referred as varstore, only varstore strucure name could be used."},
{ VFR_RETURN_BIT_WIDTH_ERROR, ": bit width must be <= sizeof (type) * 8 and the max width can not > 32" },
+ { VFR_RETURN_STRING_TO_UINT_OVERFLOW, ": String to UINT* Overflow"},
{ VFR_RETURN_CODEUNDEFINED, ": undefined Error Code" }
};
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_OBSOLETED_FRAMEWORK_OPCODE, ": Not recommend to use obsoleted framework opcode"},
{ VFR_WARNING_CODEUNDEFINED, ": undefined Warning Code" }
diff --git a/BaseTools/Source/C/VfrCompile/VfrError.h b/BaseTools/Source/C/VfrCompile/VfrError.h
index e83ae90..e795f16 100644
--- a/BaseTools/Source/C/VfrCompile/VfrError.h
+++ b/BaseTools/Source/C/VfrCompile/VfrError.h
@@ -45,12 +45,12 @@ typedef enum {
VFR_RETURN_CONSTANT_ONLY,
VFR_RETURN_VARSTORE_NAME_REDEFINED_ERROR,
VFR_RETURN_BIT_WIDTH_ERROR,
+ VFR_RETURN_STRING_TO_UINT_OVERFLOW,
VFR_RETURN_CODEUNDEFINED
} EFI_VFR_RETURN_CODE;
typedef enum {
VFR_WARNING_DEFAULT_VALUE_REDEFINED = 0,
- VFR_WARNING_STRING_TO_UINT_OVERFLOW,
VFR_WARNING_ACTION_WITH_TEXT_TWO,
VFR_WARNING_OBSOLETED_FRAMEWORK_OPCODE,
VFR_WARNING_CODEUNDEFINED
diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
index 84dd2c3..c72a62a 100644
--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
@@ -1,7 +1,7 @@
/*++ @file
Vfr Syntax
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -5322,7 +5322,7 @@ EfiVfrParser::_STOU8 (
}
if((IsHex && ((Value/16) != PreviousValue)) || (!IsHex && ((Value/10) != PreviousValue))) {
sprintf(ErrorMsg, "Overflow: Value %s is too large to store in a UINT8", OrigString);
- gCVfrErrorHandle.HandleWarning (VFR_WARNING_STRING_TO_UINT_OVERFLOW, LineNum, ErrorMsg);
+ mParserStatus = mParserStatus + gCVfrErrorHandle.HandleError (VFR_RETURN_STRING_TO_UINT_OVERFLOW, LineNum, ErrorMsg);
}
}
@@ -5359,7 +5359,7 @@ EfiVfrParser::_STOU16 (
}
if((IsHex && ((Value/16) != PreviousValue)) || (!IsHex && ((Value/10) != PreviousValue))) {
sprintf(ErrorMsg, "Overflow: Value %s is too large to store in a UINT16", OrigString);
- gCVfrErrorHandle.HandleWarning (VFR_WARNING_STRING_TO_UINT_OVERFLOW, LineNum, ErrorMsg);
+ mParserStatus = mParserStatus + gCVfrErrorHandle.HandleError (VFR_RETURN_STRING_TO_UINT_OVERFLOW, LineNum, ErrorMsg);
}
}
@@ -5396,7 +5396,7 @@ EfiVfrParser::_STOU32 (
}
if((IsHex && ((Value/16) != PreviousValue)) || (!IsHex && ((Value/10) != PreviousValue ))) {
sprintf(ErrorMsg, "Overflow: Value %s is too large to store in a UINT32", OrigString);
- gCVfrErrorHandle.HandleWarning (VFR_WARNING_STRING_TO_UINT_OVERFLOW, LineNum, ErrorMsg);
+ mParserStatus = mParserStatus + gCVfrErrorHandle.HandleError (VFR_RETURN_STRING_TO_UINT_OVERFLOW, LineNum, ErrorMsg);
}
}
@@ -5432,7 +5432,7 @@ EfiVfrParser::_STOU64 (
}
if((IsHex && ((Value/16) != PreviousValue)) || ((!IsHex && (Value/10) != PreviousValue))) {
sprintf(ErrorMsg, "Overflow: Value %s is too large to store in a UINT64", OrigString);
- gCVfrErrorHandle.HandleWarning (VFR_WARNING_STRING_TO_UINT_OVERFLOW, LineNum, ErrorMsg);
+ mParserStatus = mParserStatus + gCVfrErrorHandle.HandleError (VFR_RETURN_STRING_TO_UINT_OVERFLOW, LineNum, ErrorMsg);
}
}