vc4_bufmgr: fix time_t printf
authorPeter Seiderer <ps.report@gmx.net>
Sun, 22 Mar 2020 10:42:35 +0000 (11:42 +0100)
committerPeter Seiderer <ps.report@gmx.net>
Sun, 7 Jun 2020 16:07:47 +0000 (18:07 +0200)
Fixes:

  error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘time_t’ {aka ‘long long int’}

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4279>

src/gallium/drivers/vc4/vc4_bufmgr.c

index f7ac1698ee3de95811b131b05169f913d8a9b3fa..a786e8ee939ad354320a01b1243f233d26f3ee07 100644 (file)
@@ -100,7 +100,7 @@ vc4_bo_dump_stats(struct vc4_screen *screen)
                 struct timespec time;
                 clock_gettime(CLOCK_MONOTONIC, &time);
                 fprintf(stderr, "  now:               %ld\n",
-                        time.tv_sec);
+                        (long)time.tv_sec);
         }
 }