As a workaround for the static code checkers, enlarge the size of the string buffer 'AlignmentBuffer' so that it can hold all the digits of an unsigned 32-bit integer plus the size unit character (e.g. 'M' & 'K').
Cc: Liming Gao <[email protected]> Cc: Yonghong Zhu <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <[email protected]> --- BaseTools/Source/C/GenFfs/GenFfs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/C/GenFfs/GenFfs.c b/BaseTools/Source/C/GenFfs/GenFfs.c index 3b4a9b7761..eb40c30ea7 100644 --- a/BaseTools/Source/C/GenFfs/GenFfs.c +++ b/BaseTools/Source/C/GenFfs/GenFfs.c @@ -606,7 +606,12 @@ Returns: UINT8 PeSectionNum; UINT32 HeaderSize; UINT32 Alignment; - CHAR8 AlignmentBuffer[8]; + // + // Workaround for static code checkers. + // Ensures the size of 'AlignmentBuffer' can hold all the digits of an + // unsigned 32-bit integer plus the size unit character. + // + CHAR8 AlignmentBuffer[16]; // // Init local variables -- 2.12.0.windows.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

