diff mbox series

[BlueZ,4/5] client/player: fix printf format mismatch

Message ID 20250319103724.10433-4-ceggers@arri.de (mailing list archive)
State New
Headers show
Series [BlueZ,1/5] tools: iso-tester: add inclusion of time.h | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success

Commit Message

Christian Eggers March 19, 2025, 10:37 a.m. UTC
%zd is meant for 'size_t' rather than 'off_t'. As there is no printf
length modifier for 'off_t', cast to a standard type which should be
large enough for on all platforms.
---
 client/player.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/client/player.c b/client/player.c
index 76fee0a0597d..acb709924d96 100644
--- a/client/player.c
+++ b/client/player.c
@@ -5551,10 +5551,11 @@  static int transport_send_seq(struct transport *transport, int fd, uint32_t num)
 
 		offset = lseek(fd, 0, SEEK_CUR);
 
-		bt_shell_echo("[seq %d %d.%03ds] send: %zd/%zd bytes",
+		bt_shell_echo("[seq %d %d.%03ds] send: %lld/%lld bytes",
 				transport->seq, secs,
 				(nsecs + 500000) / 1000000,
-				offset, transport->stat.st_size);
+				(long long int)offset,
+				(long long int)transport->stat.st_size);
 	}
 
 	free(buf);