Loading
unit/lib/init: Use short int for the %d directive
scan-build under fedora40 reports the following: subsystem_ut.c:69:76: error: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 7 [-Werror=format-truncation=] The subsystem_name at minimum requires 10 bytes and there's a space for 6 more. However, %d under int may output up to 10 bytes. Changing it to short int drops the max output to 5 bytes which fits into the existing buffer nicely. Change-Id: I501e3f13dc6f1e53f00b0ca6460af5b475b8c8cd Signed-off-by:Michal Berger <michal.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24647 Reviewed-by:
Karol Latecki <karol.latecki@intel.com> Community-CI: Mellanox Build Bot Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Jim Harris <jim.harris@samsung.com> Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com>