]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools/VfrCompile: report error for Integer overflow
authorDandan Bi <dandan.bi@intel.com>
Fri, 28 Dec 2018 08:18:06 +0000 (16:18 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 8 Jan 2019 01:59:30 +0000 (09:59 +0800)
commit9248a4717a9e269670be964b56bc1a1219cae2b2
treed63367afa045c65b47dc2f4e12712ab52992881d
parent4ec00f82edc845548a2000fe514c6898932b8c95
BaseTools/VfrCompile: report error for Integer overflow

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1415

When an integer constant specified in the .vfr file is
too large for the varstore field it is being used with,
the VFR compiler reports an overflow warning like this:
Test.vfr(693): WARNING: Overflow: Value 1024 is too large to
         store in a UINT8
    : String to UINT* Overflow
Since Warning does not break the build process,
and it is easy to miss it.
This patch is to update the code to report error and break
the build if meet this kind of issue.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/C/VfrCompile/VfrError.cpp
BaseTools/Source/C/VfrCompile/VfrError.h
BaseTools/Source/C/VfrCompile/VfrSyntax.g