From ac4a92264accd03c4a1686847ede5e816e3ed435 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sat, 10 Nov 2012 14:16:27 +0200 Subject: [PATCH] monitor: Fix uint64_t format specifier To be compilable both on 32 and 64 bit architectures the PRIu64 macro needs to be used as format specifier for uint64_t. Otherwise we'll get the following type of error either on 32 bit (for %lx) or 64 bit (for %llx) : monitor/l2cap.c: In function 'sig_info_rsp': monitor/l2cap.c:351:3: error: format '%lx' expects argument of type 'long unsigned int', but argument 8 has type 'uint64_t' [-Werror=format] --- monitor/l2cap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/monitor/l2cap.c b/monitor/l2cap.c index 2e2651025..017f7a3c1 100644 --- a/monitor/l2cap.c +++ b/monitor/l2cap.c @@ -26,6 +26,8 @@ #include #endif +#include + #include #include "bt.h" @@ -348,7 +350,7 @@ static void sig_info_rsp(const void *data, uint16_t size) break; } channels = bt_get_le64(data); - print_field("Channels: 0x%16.16lx", channels); + print_field("Channels: 0x%16.16" PRIu64, channels); break; default: packet_hexdump(data, size); -- 2.47.3