From 09968fb3154cbbecbf62a2cc677296a484a70b8a Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 24 Jan 2009 01:01:27 +0000 Subject: Fixup ABS(), as per number.c svn path=/trunk/libcss/; revision=6215 --- test/dump.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/dump.h') diff --git a/test/dump.h b/test/dump.h index 1adfbe6..b173174 100644 --- a/test/dump.h +++ b/test/dump.h @@ -321,7 +321,7 @@ static const char *sides[] = { "top", "right", "bottom", "left" }; static void dump_fixed(fixed f, char **ptr) { -#define ABS(x) ((x) < 0 ? -(x) : (x)) +#define ABS(x) (uint32_t)((x) < 0 ? -(x) : (x)) uint32_t uintpart = FIXTOINT(ABS(f)); /* + 500 to ensure round to nearest (division will truncate) */ uint32_t fracpart = ((ABS(f) & 0x3ff) * 1000 + 500) / (1 << 10); -- cgit v1.2.3