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>
if (cfg.bs) {
if ((cfg.bs & (~cfg.bs + 1)) != cfg.bs) {
fprintf(stderr,
- "Invalid value for block size (%llu), must be a power of two\n",
+ "Invalid value for block size (%lu), must be a power of two\n",
cfg.bs);
return EINVAL;
}
}
if (cfg.lbaf == 0xff) {
fprintf(stderr,
- "LBAF corresponding to block size %llu (LBAF %u) not found\n",
+ "LBAF corresponding to block size %lu (LBAF %u) not found\n",
cfg.bs, lbads);
fprintf(stderr,
"Please correct block size, or specify LBAF directly\n");