compositor: Use stdint for specifing integer storage master next
authorMarius Vlad <marius.vlad@collabora.com>
Fri, 26 Apr 2024 11:04:08 +0000 (14:04 +0300)
committerMarius Vlad <marius.vlad@collabora.com>
Fri, 26 Apr 2024 11:04:08 +0000 (14:04 +0300)
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 <marius.vlad@collabora.com>
Change-Id: I9c9a532e2535501035867ed29a2d296900509489

src/compositor.c

index bdff9ed..078157a 100644 (file)
@@ -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;