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

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

 



%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 --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);
-- 
2.43.0





[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