This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[COMMITTED 3/3] math/test-fenvinline: Cast fe_exc to unsigned int before printing


On Alpha and IA-64, fexcept_t is unsigned long.  But all the values
fit within an int, so the cast is ok for printing.  All other hosts
use unsigned int or unsigned short already.
---
 ChangeLog              | 3 +++
 math/test-fenvinline.c | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f7ac661..e4f86dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
 	* sysdeps/unix/alpha/sysdep.h: Unconditionally include dl-sysdep.h.
 	* sysdeps/alpha/fpu/libm-test-ulps: Update.
 
+	* math/test-fenvinline.c (feenable_test): Cast fe_exc to
+	unsigned int before printing.
+
 2015-04-03  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>
 
 	[BZ #17596]
diff --git a/math/test-fenvinline.c b/math/test-fenvinline.c
index 87c9df4..b02cefd 100644
--- a/math/test-fenvinline.c
+++ b/math/test-fenvinline.c
@@ -249,7 +249,7 @@ feenable_test (const char *flag_name, fexcept_t fe_exc)
   if (excepts != fe_exc)
     {
       printf ("Test: fedisableexcept (%s) failed, return should be 0x%x, is 0x%x\n",
-              flag_name, fe_exc, excepts);
+              flag_name, (unsigned int)fe_exc, excepts);
       ++count_errors;
     }
 
@@ -284,7 +284,7 @@ feenable_test (const char *flag_name, fexcept_t fe_exc)
   if (excepts != fe_exc)
     {
       printf ("Test: fedisableexcept (%s) failed, return should be 0x%x, is 0x%x\n",
-              flag_name, fe_exc, excepts);
+              flag_name, (unsigned int)fe_exc, excepts);
       ++count_errors;
     }
 #endif
-- 
2.1.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]