From 98c783852039061db8c1611742660aaded0eab77 Mon Sep 17 00:00:00 2001 From: Anton Vorontsov Date: Sat, 28 Nov 2009 01:33:47 +0300 Subject: Use proper types for do_div do_div accepts unsigned 64-bit integer type for dividend, signed types would cause do_div's typecheck fail: stat-common.c: In function 'needed_space': stat-common.c:50: error: comparison of distinct pointer types lacks a cast ...same errors in time.c and tapset-timers.cxx's generated code... A fix for time.c is special, on ppc32 cycles_t is 32-bit, so technically we don't need do_div, but since the whole _stp_gettimeofday_ns() operates on 64-bit types we'd better be safe and use uint64_t for the math. Signed-off-by: Anton Vorontsov --- runtime/time.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/time.c') diff --git a/runtime/time.c b/runtime/time.c index 58c23e57..d588370f 100644 --- a/runtime/time.c +++ b/runtime/time.c @@ -275,7 +275,8 @@ static int64_t _stp_gettimeofday_ns(void) { int64_t base; - cycles_t last, delta; + cycles_t last; + uint64_t delta; unsigned int freq; unsigned int seq; stp_time_t *time; -- cgit