Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 May 2017 18:54:25 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r318365 - in stable: 10/lib/msun/src 11/lib/msun/src
Message-ID:  <201705161854.v4GIsPdD075523@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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/11/lib/msun/src/catrig.c
  stable/11/lib/msun/src/catrigf.c
Directory Properties:
  stable/11/   (props changed)

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

Modified: stable/11/lib/msun/src/catrig.c
==============================================================================
--- stable/11/lib/msun/src/catrig.c	Tue May 16 18:46:56 2017	(r318364)
+++ stable/11/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/11/lib/msun/src/catrigf.c
==============================================================================
--- stable/11/lib/msun/src/catrigf.c	Tue May 16 18:46:56 2017	(r318364)
+++ stable/11/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))
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705161854.v4GIsPdD075523>