From 18e93caca8ad397d504215d673765871b2c88f25 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Fri, 26 Apr 2024 14:04:08 +0300 Subject: [PATCH] compositor: Use stdint for specifing integer storage Fixes the following build failure on arm32: | ../git/src/compositor.c: In function 'log_timestamp': | ../git/src/compositor.c:1848:39: error: format '%li' expects argument of type 'long int', but argument 6 has type '__suseconds64_t' {aka 'long long i nt'} [-Werror=format=] | 1848 | snprintf(buf, len, "%s[%s.%03li]", datestr, | | ~~~~^ | | | | | long int | | %03lli | 1849 | timestr, (tv.tv_usec / 1000)); | | ~~~~~~~~~~~~~~~~~~~ | | | | | __suseconds64_t {aka long long int} Signed-off-by: Marius Vlad Change-Id: I9c9a532e2535501035867ed29a2d296900509489 --- src/compositor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compositor.c b/src/compositor.c index bdff9ed..078157a 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1845,7 +1845,7 @@ log_timestamp(char *buf, size_t len) strftime(timestr, sizeof(timestr), "%H:%M:%S", brokendown_time); /* if datestr is empty it prints only timestr*/ - snprintf(buf, len, "%s[%s.%03li]", datestr, + snprintf(buf, len, "%s[%s.%03"PRIi64"]", datestr, timestr, (tv.tv_usec / 1000)); return buf; -- 2.16.6