From 7a37e5df126dd3ec92d09ef8212177d1caba5267 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 6 Feb 2024 14:10:23 +0100 Subject: [PATCH] xwayland: fix int size mismatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC reports: [1/2] Compiling C object hw/xwayland/Xwayland.p/xwayland.c.o ../hw/xwayland/xwayland.c: In function ‘try_raising_nofile_limit’: ../hw/xwayland/xwayland.c:161:72: warning: format ‘%li’ expects argument of type ‘long int’, but argument 4 has type ‘rlim_t’ {aka ‘long long unsigned int’} [-Wformat=] 161 | LogMessageVerb(X_INFO, 3, "Raising the file descriptors limit to %li\n", | ~~^ | | | long int | %lli 162 | rlim.rlim_max); | ~~~~~~~~~~~~~ | | | rlim_t {aka long long unsigned int} Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- hw/xwayland/xwayland.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index 0879db69e..56964bbfb 100644 --- a/hw/xwayland/xwayland.c +++ b/hw/xwayland/xwayland.c @@ -158,9 +158,9 @@ try_raising_nofile_limit(void) return; } - LogMessageVerb(X_INFO, 3, "Raising the file descriptors limit to %li\n", - rlim.rlim_max); -#endif + LogMessageVerb(X_INFO, 3, "Raising the file descriptors limit to %llu\n", + (long long unsigned int) rlim.rlim_max); +#endif /* RLIMIT_NOFILE */ } static void