From 4a11d0e470bcd6fd8cb7d18a35ebd460217b9a99 Mon Sep 17 00:00:00 2001
From: Jan Beich <jbeich@FreeBSD.org>
Date: Sun, 6 Jan 2019 12:19:01 +0000
Subject: Use %z for printing size_t

../sway/desktop/transaction.c:367:17: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
                        transaction, transaction->num_waiting);
                                     ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/wlr/util/log.h:56:72: note: expanded from macro 'wlr_log'
        _wlr_log(verb, "[%s:%d] " fmt, _wlr_strip_path(__FILE__), __LINE__, ##__VA_ARGS__)
                                                                              ^~~~~~~~~~~
../sway/desktop/transaction.c:477:5: error: format specifies type 'long' but the argument has type 'unsigned int' [-Werror,-Wformat]
                                transaction->num_configures - transaction->num_waiting + 1,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/wlr/util/log.h:56:72: note: expanded from macro 'wlr_log'
        _wlr_log(verb, "[%s:%d] " fmt, _wlr_strip_path(__FILE__), __LINE__, ##__VA_ARGS__)
                                                                              ^~~~~~~~~~~
../sway/desktop/transaction.c:478:5: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
                                transaction->num_configures, ms,
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/wlr/util/log.h:56:72: note: expanded from macro 'wlr_log'
        _wlr_log(verb, "[%s:%d] " fmt, _wlr_strip_path(__FILE__), __LINE__, ##__VA_ARGS__)
                                                                              ^~~~~~~~~~~
---
 sway/desktop/transaction.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'sway')

diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index bf0038b4..f46938e2 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -363,7 +363,7 @@ static void transaction_progress_queue(void) {
 
 static int handle_timeout(void *data) {
 	struct sway_transaction *transaction = data;
-	wlr_log(WLR_DEBUG, "Transaction %p timed out (%li waiting)",
+	wlr_log(WLR_DEBUG, "Transaction %p timed out (%zi waiting)",
 			transaction, transaction->num_waiting);
 	transaction->num_waiting = 0;
 	transaction_progress_queue();
@@ -472,7 +472,7 @@ static void set_instruction_ready(
 		struct timespec *start = &transaction->commit_time;
 		float ms = (now.tv_sec - start->tv_sec) * 1000 +
 			(now.tv_nsec - start->tv_nsec) / 1000000.0;
-		wlr_log(WLR_DEBUG, "Transaction %p: %li/%li ready in %.1fms (%s)",
+		wlr_log(WLR_DEBUG, "Transaction %p: %zi/%zi ready in %.1fms (%s)",
 				transaction,
 				transaction->num_configures - transaction->num_waiting + 1,
 				transaction->num_configures, ms,
-- 
cgit v1.2.3