Percent sign is missing before the first format specifier, so instead of "E: size (%llu bytes) is not a multiple of blocksize (%d)!\n" it expands to "E: size (llu bytes) is not a multiple of blocksize (%d)!\n" and triggers a slightly obscure compiler warning:
nbd-client.c: In function 'main':
nbd-client.c:1196:33: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u64' {aka 'long long unsigned int'} [-Wformat=]
1196 | fprintf(stderr, "E: size (" PRIu64 " bytes) is not a multiple of blocksize (%d)!\n", force_size64, blocksize);
| ^~~~~~~~~~~ ~~~~~~~~~~~~
| |
| u64 {aka long long unsigned int}
nbd-client.c:1196:94: note: format string is defined here
1196 | fprintf(stderr, "E: size (" PRIu64 " bytes) is not a multiple of blocksize (%d)!\n", force_size64, blocksize);
| ~^
| |
| int
| %lld
The fix seems to be trivial: "E: size (%" instead of "E: size ("
Maybe it was mentioned in the mailing list but I couldn't find any mentions of this issue there.
https://github.com/NetworkBlockDevice/nbd/blob/9ed62752ae804546a01ce4694f1c35deebec2886/nbd-client.c#L1195-L1198
Percent sign is missing before the first format specifier, so instead of
"E: size (%llu bytes) is not a multiple of blocksize (%d)!\n"
it expands to"E: size (llu bytes) is not a multiple of blocksize (%d)!\n"
and triggers a slightly obscure compiler warning:The fix seems to be trivial:
"E: size (%"
instead of"E: size ("
Maybe it was mentioned in the mailing list but I couldn't find any mentions of this issue there.