[PATCH] Fix compilation error in mgmt/main.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use %u instead of %zu for printing len which is of type uint16_t.

CC     mgmt/main.o
cc1: warnings being treated as errors
mgmt/main.c: In function ‘mgmt_device_found’:
mgmt/main.c:561: error: format ‘%zu’ expects type ‘size_t’, but argument 4 has type ‘int’
---
 mgmt/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mgmt/main.c b/mgmt/main.c
index 096a8a4..ecb922d 100644
--- a/mgmt/main.c
+++ b/mgmt/main.c
@@ -557,7 +557,7 @@ static int mgmt_device_found(int mgmt_sk, uint16_t index,
 
 	eir_len = bt_get_le16(&ev->eir_len);
 	if (len != sizeof(*ev) + eir_len) {
-		fprintf(stderr, "dev_found: expected %zu bytes, got %zu bytes",
+		fprintf(stderr, "dev_found: expected %zu bytes, got %u bytes",
 						sizeof(*ev) + eir_len, len);
 		return -EINVAL;
 	}
-- 
on behalf of ST-Ericsson

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux