mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-14 10:31:59 +00:00
The compiler report the error:
lib/sprintf.c:102:42: error: initializer-string for array of 'char'
truncates NUL terminator but destination lacks 'nonstring' attribute (6
chars into 5 available) [-Werror=unterminated-string-initialization]
102 | static const char flagchars[5] = "#0- +";
| ^~~~~~~
The fix is to change flagchars[5] to flagchars[6].
Tracked-On: #8803
Signed-off-by: Haoyu Tang <haoyu.tang@intel.com>
Reviewed-by: Yifan Liu <yifan1.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>