diff options
author | Mike Frysinger <vapier@chromium.org> | 2017-05-24 22:28:57 -0400 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2017-05-27 01:45:17 +0200 |
commit | a8ca03223a433fefdf5de54e7bc9d7c0d6c14c3f (patch) | |
tree | 82b418dfde6f3c1385ca63ead3054557bfb57f25 /util | |
parent | 5be0b2e03d7550468b7ee495baebe1123ccdda77 (diff) | |
download | coreboot-a8ca03223a433fefdf5de54e7bc9d7c0d6c14c3f.tar.xz |
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 <vapier@chromium.org>
Reviewed-on: https://review.coreboot.org/19902
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/cbfstool/cbfscomptool.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |