v3d_bufmgr: fix time_t printf
authorPeter Seiderer <ps.report@gmx.net>
Sun, 22 Mar 2020 12:03:00 +0000 (13:03 +0100)
committerPeter Seiderer <ps.report@gmx.net>
Sun, 7 Jun 2020 16:08:47 +0000 (18:08 +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/v3d/v3d_bufmgr.c

index 50e4081dafda444b71ffadf6569ea73309ff6da7..31a08036b384de96cf4932ce618284d24b509143 100644 (file)
@@ -81,7 +81,7 @@ v3d_bo_dump_stats(struct v3d_screen *screen)
                 struct timespec time;
                 clock_gettime(CLOCK_MONOTONIC, &time);
                 fprintf(stderr, "  now:               %ld\n",
-                        time.tv_sec);
+                        (long)time.tv_sec);
         }
 }