Author: dim
Date: Tue May 16 18:54:25 2017
New Revision: 318365
URL: https://svnweb.freebsd.org/changeset/base/318365

Log:
  MFC r318259:
  
  Silence a -Wunused warning about the junk variable being used to raise
  an inexact floating point exception.  The variable cannot be eliminated,
  unfortunately, otherwise the desired addition triggering the exception
  will be emitted neither by clang, nor by gcc.
  
  Reviewed by:  Steve Kargl, bde

Modified:
  stable/10/lib/msun/src/catrig.c
  stable/10/lib/msun/src/catrigf.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/lib/msun/src/catrig.c
  stable/11/lib/msun/src/catrigf.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/lib/msun/src/catrig.c
==============================================================================
--- stable/10/lib/msun/src/catrig.c     Tue May 16 18:46:56 2017        
(r318364)
+++ stable/10/lib/msun/src/catrig.c     Tue May 16 18:54:25 2017        
(r318365)
@@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
 #define isinf(x)       (fabs(x) == INFINITY)
 #undef isnan
 #define isnan(x)       ((x) != (x))
-#define        raise_inexact() do { volatile float junk = 1 + tiny; } while(0)
+#define        raise_inexact() do { volatile float junk __unused = 1 + tiny; } 
while(0)
 #undef signbit
 #define signbit(x)     (__builtin_signbit(x))
 

Modified: stable/10/lib/msun/src/catrigf.c
==============================================================================
--- stable/10/lib/msun/src/catrigf.c    Tue May 16 18:46:56 2017        
(r318364)
+++ stable/10/lib/msun/src/catrigf.c    Tue May 16 18:54:25 2017        
(r318365)
@@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$");
 #define isinf(x)       (fabsf(x) == INFINITY)
 #undef isnan
 #define isnan(x)       ((x) != (x))
-#define        raise_inexact() do { volatile float junk = 1 + tiny; } while(0)
+#define        raise_inexact() do { volatile float junk __unused = 1 + tiny; } 
while(0)
 #undef signbit
 #define signbit(x)     (__builtin_signbitf(x))
 
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to