]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
math/test-fenvinline: Cast fe_exc to unsigned int before printing
authorRichard Henderson <rth@twiddle.net>
Mon, 6 Apr 2015 17:43:59 +0000 (10:43 -0700)
committerRichard Henderson <rth@twiddle.net>
Mon, 6 Apr 2015 17:43:59 +0000 (10:43 -0700)
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
math/test-fenvinline.c

index f7ac661cfe74848b78253ec1ed7e8ab3cd2cbf9a..e4f86dc02d261027937785044f385e7cd47fcf74 100644 (file)
--- 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]
index 87c9df44b3dae7b2ea19f0b614ca3e77b325d221..b02cefd7f8043835d76d6c3943cc2c10ed51890b 100644 (file)
@@ -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