From a8ca03223a433fefdf5de54e7bc9d7c0d6c14c3f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 24 May 2017 22:28:57 -0400 Subject: cbfscomptool: fix display of time_t Not all systems have sizeof(time_t) == sizeof(long), so cast the delta here to a long to match the %ld format. Change-Id: If235577fc35454ddb15043c5a543f614b6f16a9e Signed-off-by: Mike Frysinger Reviewed-on: https://review.coreboot.org/19902 Reviewed-by: Patrick Georgi Tested-by: build bot (Jenkins) --- util/cbfstool/cbfscomptool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/cbfstool/cbfscomptool.c b/util/cbfstool/cbfscomptool.c index 3430809e0d..1021bc858c 100644 --- a/util/cbfstool/cbfscomptool.c +++ b/util/cbfstool/cbfscomptool.c @@ -81,7 +81,7 @@ int benchmark() clock_gettime(CLOCK_MONOTONIC, &t_e); printf("compressing %d bytes to %d took %ld seconds\n", bufsize, outsize, - t_e.tv_sec - t_s.tv_sec); + (long)(t_e.tv_sec - t_s.tv_sec)); } free(data); free(compressed_data); -- cgit v1.2.3