From ba2fa57d3c66427a3808661b506cd8457c872af0 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 24 May 2017 22:28:57 -0400 Subject: [PATCH] UPSTREAM: 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. BUG=none BRANCH=none TEST=none Change-Id: Ic398f319b1711f32e4e2c0b579d2fc858084f714 Signed-off-by: Patrick Georgi Original-Commit-Id: a8ca03223a433fefdf5de54e7bc9d7c0d6c14c3f Original-Change-Id: If235577fc35454ddb15043c5a543f614b6f16a9e Original-Signed-off-by: Mike Frysinger Original-Reviewed-on: https://review.coreboot.org/19902 Original-Reviewed-by: Patrick Georgi Original-Tested-by: build bot (Jenkins) Reviewed-on: https://chromium-review.googlesource.com/517929 Commit-Ready: Patrick Georgi Tested-by: Patrick Georgi Reviewed-by: Patrick Georgi --- util/cbfstool/cbfscomptool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);