From 32ea29485bdd610b7d05dd806c5f06f68da0f0fe Mon Sep 17 00:00:00 2001 From: Friedrich Beckmann Date: Sun, 17 Sep 2017 09:16:23 +0200 Subject: [PATCH] changed abs to labs function to avoid warning During compilation on MacOS with clang I saw a warning about a type mismatch for the abs function. I adapted the function from abs to labs. --- src/data/data-out.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/data-out.c b/src/data/data-out.c index 157335cbf4..3f3611f00d 100644 --- a/src/data/data-out.c +++ b/src/data/data-out.c @@ -805,7 +805,7 @@ output_scientific (double number, const struct fmt_spec *format, { char *cp = strchr (p, 'E') + 1; long int exponent = strtol (cp, NULL, 10); - if (abs (exponent) > 999) + if (labs (exponent) > 999) return false; sprintf (cp, "%+04ld", exponent); } -- 2.30.2