]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools: add ASSERT checker for array buffer value assignment.
authorZhaozh1x <zhiqiangx.zhao@intel.com>
Tue, 4 Sep 2018 09:26:11 +0000 (17:26 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 16 Oct 2018 00:59:49 +0000 (08:59 +0800)
commite451aaa637e437ca9e5435e21f2c9493cd1e044e
treecc5f9213900bda164989b5fb73a99ced470c4aca
parent272ecccd793c8fb12f4f356ada18a870c2426603
BaseTools: add ASSERT checker for array buffer value assignment.

V3:
Update the error message for array checker.
V2:
1. Add comments for each ASSERT.
2. ASSERT need to skip the case of array size of array as zero. For
example, TestArray[] in struct in header file.
V1:
For structure PCD,
1. use compiler time assert to check the array index, report error
if array index exceeds the array number.
2. use compiler time assert to check the array size, report error
if the user declared size in header file is smaller than the user
defined in DEC/DSC file.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: ZhiqiangX Zhao <zhiqiangx.zhao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/C/Common/PcdValueCommon.h
BaseTools/Source/Python/Workspace/DscBuildData.py