linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix compilation error in mgmt/main.c
@ 2012-01-18 12:23 Szymon Janc
  2012-01-18 12:29 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Szymon Janc @ 2012-01-18 12:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: kanak.gupta, Szymon Janc

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-18 12:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-18 12:23 [PATCH] Fix compilation error in mgmt/main.c Szymon Janc
2012-01-18 12:29 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).