]> sourceware.org Git - glibc.git/commitdiff
math/test-fenvinline: avoid compiler warning
authorChris Metcalf <cmetcalf@ezchip.com>
Fri, 10 Jul 2015 20:11:40 +0000 (16:11 -0400)
committerChris Metcalf <cmetcalf@ezchip.com>
Fri, 10 Jul 2015 20:11:40 +0000 (16:11 -0400)
On tile (and any other machine with no FP exceptions) the
feenable_test() function will generate a "function defined but
not used" warning because all of the callers are commented out.
We already were ifdef'ing out the body of the function, so instead
just ifdef out the entire function if FE_ALL_EXCEPT == 0.

ChangeLog
math/test-fenvinline.c

index 0c7fc2ca927b54a11b20fa0933673cc4e0a5ecf8..8188ee3a206130ca402cd4d299df2549803b52a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-07-10  Chris Metcalf  <cmetcalf@ezchip.com>
+
+       * math/test-fenvinline.c (feenable_test) [FE_ALL_EXCEPT == 0]:
+       Comment out the whole function, not just its body.
+
 2015-07-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
        * stdlib/tst-tls-atexit.c (load): Remove unnecessary mutex
index b02cefd7f8043835d76d6c3943cc2c10ed51890b..d1962680454b28c8fd2ef47bebc946aab97ba4f1 100644 (file)
@@ -200,11 +200,11 @@ test_fesetround (void)
 #endif
 }
 
+#if FE_ALL_EXCEPT
 /* Tests for feenableexcept/fedisableexcept.  */
 static void
 feenable_test (const char *flag_name, fexcept_t fe_exc)
 {
-#if FE_ALL_EXCEPT
   int fe_exci = fe_exc;
   double fe_excd = fe_exc;
   int excepts;
@@ -287,8 +287,8 @@ feenable_test (const char *flag_name, fexcept_t fe_exc)
               flag_name, (unsigned int)fe_exc, excepts);
       ++count_errors;
     }
-#endif
 }
+#endif
 
 static void
 test_feenabledisable (void)
This page took 0.108443 seconds and 5 git commands to generate.