* [COMMITTED] math/test-fenvinline: avoid compiler warning
@ 2015-07-10 20:13 Chris Metcalf
0 siblings, 0 replies; only message in thread
From: Chris Metcalf @ 2015-07-10 20:13 UTC (permalink / raw)
To: libc-alpha; +Cc: Chris Metcalf
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 | 5 +++++
math/test-fenvinline.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0c7fc2c..8188ee3 100644
--- 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
diff --git a/math/test-fenvinline.c b/math/test-fenvinline.c
index b02cefd..d196268 100644
--- a/math/test-fenvinline.c
+++ b/math/test-fenvinline.c
@@ -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)
--
1.7.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-10 20:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-10 20:13 [COMMITTED] math/test-fenvinline: avoid compiler warning Chris Metcalf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).