nbd/client.c: Correct trace format string
PATCH 1/1 nbd/client.c: Correct trace format string
The trace format string in nbd_send_request uses PRIu16 for request->type, but request->type is a uint32_t. This provokes compiler warnings on the OSX clang. Use PRIu32 instead.
---
I didn't catch this when I ran the merge build test for the pull request, because I don't have warnings-as-errors enabled on the OSX test machine yet.
nbd/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
nbd/client.c +1 -1
@@ -711,7 +711,7 @@ ssize_t nbd_send_request(QIOChannel *ioc, struct nbd_request *request)TRACE ("Sending request to server: " "{ .from = %" PRIu64", .len = %" PRIu32", .handle = %" PRIu64 -", .type=%" PRIu16" }" , +", .type=%" PRIu32" }" , request->from, request->len, request->handle, request->type);stl_be_p (buf,NBD_REQUEST_MAGIC );
Signature · 1 line
1.9.1
Quoted 9 lines · Peter Maydell
The trace format string in
nbd_send_requestuses PRIu16 forrequest->type, butrequest->typeis auint32_t. This provokes compiler warnings on the OSX clang. Use PRIu32 instead.Signed-off-by Peter Maydell <[email protected]>---
I didn't catch this when I ran the merge build test for the pull request, because I don't have warnings-as-errors enabled on the OSX test machine yet.
Thanks, please apply directly if you wish.
Paolo
Peter Maydell
AppliedQuoted 7 lines · Paolo Bonzini
Quoted 4 lines · Peter Maydell
The trace format string in
nbd_send_requestuses PRIu16 forrequest->type, butrequest->typeis auint32_t. This provokes compiler warnings on the OSX clang. Use PRIu32 instead.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Peter Maydell <[email protected]>---
I didn't catch this when I ran the merge build test for the pull request, because I don't have warnings-as-errors enabled on the OSX test machine yet.Thanks, please apply directly if you wish.
thanks, applied to master
-- PMM