]> Savannah Git Hosting - gnulib.git/commitdiff
round, roundf: Avoid compiler warning in configure test.
authorBruno Haible <bruno@clisp.org>
Tue, 11 Jul 2017 01:52:48 +0000 (03:52 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 11 Jul 2017 01:52:48 +0000 (03:52 +0200)
* m4/round.m4 (gl_FUNC_ROUND): Use 'return' instead of exit().
* m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.

ChangeLog
m4/round.m4
m4/roundf.m4

index c05a5e481b31e2cfbd0cb056f90b9e6c9d8ed719..4fcc254b4f4c2b49b8a48189c4548ad8b8fcd99b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-07-10  Bruno Haible  <bruno@clisp.org>
+
+       round, roundf: Avoid compiler warning in configure test.
+       * m4/round.m4 (gl_FUNC_ROUND): Use 'return' instead of exit().
+       * m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
+
 2017-07-10  Bruno Haible  <bruno@clisp.org>
 
        getlogin tests: Avoid #ifdefs when sharing code between modules.
index 45b7df4591e836482141af03ac8fc64d8c9fc7e0..ede34b29d6a81f45a0ce78fb9915238e4fff76a0 100644 (file)
@@ -1,4 +1,4 @@
-# round.m4 serial 16
+# round.m4 serial 17
 dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -57,7 +57,7 @@ int main()
     * (double) (1U << ((DBL_MANT_DIG + 3) / 5))
     * (double) (1U << ((DBL_MANT_DIG + 4) / 5));
   volatile double x = 0.5 - 0.5 / TWO_MANT_DIG;
-  exit (x < 0.5 && round (x) != 0.0);
+  return (x < 0.5 && round (x) != 0.0);
 }]])], [gl_cv_func_round_works=yes], [gl_cv_func_round_works=no],
         [case "$host_os" in
            netbsd* | aix*) gl_cv_func_round_works="guessing no";;
index 543ee0f93421d1ea812b9bff1a184af555fdfad3..f623b554a78bc3be7be066bc64c40ea6211b40aa 100644 (file)
@@ -1,4 +1,4 @@
-# roundf.m4 serial 17
+# roundf.m4 serial 18
 dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -54,7 +54,7 @@ int main()
     * (float) (1U << ((FLT_MANT_DIG + 1) / 3))
     * (float) (1U << ((FLT_MANT_DIG + 2) / 3));
   volatile float x = 0.5f - 0.5f / TWO_MANT_DIG;
-  exit (x < 0.5f && roundf (x) != 0.0f);
+  return (x < 0.5f && roundf (x) != 0.0f);
 }]])], [gl_cv_func_roundf_works=yes], [gl_cv_func_roundf_works=no],
         [case "$host_os" in
            mingw*) gl_cv_func_roundf_works="guessing no";;