+3
−2
Loading
nvme_auth.c:293:40: warning: format ‘%x’ expects argument of type ‘unsigned int *’, but argument 3 has type ‘int *’ [-Wformat=]
293 | rc = sscanf(keystr, "DHHC-1:%02x:", &hash);
| ~~~^ ~~~~~
| | |
| | int *
| unsigned int *
| %02x
Issue found when experimentally checked -Wpedantic flag on nvme library.
This flag also catches issue fixed here
https://review.spdk.io/c/spdk/spdk/+/25927
however besides these 2 it catches much more (~280).
Most of the issues discovered with -Wpedantinc (within nvme) are due to
forbidden zero-size array, invalid use of flexible array or empty
initializer braces.
Change-Id: I76ee208557dd605bbdedaa55d0aed82f95599365
Signed-off-by:
Jacek Kalwas <jacek.kalwas@nutanix.com>
Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/25930
Community-CI: Mellanox Build Bot
Tested-by:
SPDK Automated Test System <spdkbot@gmail.com>
Reviewed-by:
Jim Harris <jim.harris@nvidia.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by:
Ankit Kumar <ankit.kumar@samsung.com>
Reviewed-by:
Changpeng Liu <changpeliu@tencent.com>