Commit e331fd7f authored by Khem Raj's avatar Khem Raj Committed by Marge Bot

vc4: use intmax_t for formatted output of timespec members

32bit architectures which have 64bit time_t does not fit the assumption
of time_t being same as system long int

Fixes
error: format specifies type 'long' but the argument has type 'time_t' (aka 'long long') [-Werror,-Wformat]
                        time.tv_sec);
                        ^~~~~~~~~~~
Signed-off-by: Khem Raj's avatarKhem Raj <raj.khem@gmail.com>
Reviewed-by: Iago Toral's avatarIago Toral Quiroga <itoral@igalia.com>
Part-of: <!2966>
parent c8630fd1
Pipeline #224118 waiting for manual action with stages
in 24 seconds
......@@ -72,8 +72,8 @@ v3d_bo_dump_stats(struct v3d_screen *screen)
struct timespec time;
clock_gettime(CLOCK_MONOTONIC, &time);
fprintf(stderr, " now: %ld\n",
(long)time.tv_sec);
fprintf(stderr, " now: %jd\n",
(intmax_t)time.tv_sec);
}
}
......
......@@ -99,8 +99,8 @@ vc4_bo_dump_stats(struct vc4_screen *screen)
struct timespec time;
clock_gettime(CLOCK_MONOTONIC, &time);
fprintf(stderr, " now: %ld\n",
(long)time.tv_sec);
fprintf(stderr, " now: %jd\n",
(intmax_t)time.tv_sec);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment