From a606ea14a9ec1670cae22d9514cfc5d907d9dd1d Mon Sep 17 00:00:00 2001 From: christiaans Date: Wed, 25 Oct 2006 07:43:46 +0000 Subject: [PATCH] Exterminate warnings. Changed 64 bit arith into 32 bit and output fmt from decimal to hex. --- ports/unix/perf.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ports/unix/perf.c b/ports/unix/perf.c index ec494a9..bed4614 100644 --- a/ports/unix/perf.c +++ b/ports/unix/perf.c @@ -41,11 +41,12 @@ perf_print(unsigned long c1l, unsigned long c1h, unsigned long c2l, unsigned long c2h, char *key) { - unsigned long long start, end; - - start = (unsigned long long)c2h << 32 | c2l; - end = (unsigned long long)c1h << 32 | c1l; - fprintf(f, "%s: %llu\n", key, start - end); + unsigned long sub_ms, sub_ls; + + sub_ms = c2h - c1h; + sub_ls = c2l - c1l; + if (c2l < c1l) sub_ms--; + fprintf(f, "%s: %.8lu%.8lu\n", key, sub_ms, sub_ls); fflush(NULL); }