]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
Fix compilation with GCC-8
authorBreno Leitao <leitao@debian.org>
Mon, 21 Jan 2019 11:31:15 +0000 (06:31 -0500)
committerBreno Leitao <leitao@debian.org>
Mon, 21 Jan 2019 11:31:15 +0000 (06:31 -0500)
commitdc26bb70d82569730b4ce5c88f22084812a2334d
tree2000ea6b49de33cd03ee908985c5bf9f9cafc856
parenteb58f548342f477d02da555cb939b3e6a5609269
Fix compilation with GCC-8

Printf() is being called to print an unsigned long int using the long long
identifier. This causes the following error with GCC-8:

nvme.c:3056:5: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘__u64 {aka long unsigned int}’ [-Werror=format=]
     "Invalid value for block size (%llu), must be a power of two\n",
     ^
nvme.c:3091:6: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘__u64 {aka long unsigned int}’ [-Werror=format=]
      "LBAF corresponding to block size %llu (LBAF %u) not found\n",

Adjusting the printf arguments to print the proper format.

Signed-off-by: Breno Leitao <leitao@debian.org>
nvme.c