summaryrefslogtreecommitdiff
path: root/numpy/core/src
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2018-02-02 21:03:17 -0700
committerGitHub <noreply@github.com>2018-02-02 21:03:17 -0700
commitd1c66d0bb940025df384fca761f670112afe21af (patch)
tree6e7142d349ce04851a084cc348b37b5513505153 /numpy/core/src
parent6f4e59c6f9baf15249691af118ba651b2f447549 (diff)
parent8ab4c010dc982aafce0b8048f72ede0252c18fb0 (diff)
downloadnumpy-d1c66d0bb940025df384fca761f670112afe21af.tar.gz
Merge pull request #10503 from charris/fix-unused-result-warning
BUG: Fix unused-result warning.
Diffstat (limited to 'numpy/core/src')
-rw-r--r--numpy/core/src/npymath/npy_math_complex.c.src12
1 files changed, 9 insertions, 3 deletions
diff --git a/numpy/core/src/npymath/npy_math_complex.c.src b/numpy/core/src/npymath/npy_math_complex.c.src
index fb31e8e6a..ea784ec5b 100644
--- a/numpy/core/src/npymath/npy_math_complex.c.src
+++ b/numpy/core/src/npymath/npy_math_complex.c.src
@@ -35,11 +35,17 @@
#include "npy_math_private.h"
#include <numpy/utils.h>
-
-#define raise_inexact() do { volatile npy_float junk = 1 + tiny; } while(0)
+/*
+ * Hack inherited from BSD, the intent is to set the FPU inexact
+ * flag in an efficient way. The flag is IEEE specific. See
+ * https://github.com/freebsd/freebsd/blob/4c6378299/lib/msun/src/catrig.c#L42
+ */
+#define raise_inexact() do { \
+ volatile npy_float NPY_UNUSED(junk) = 1 + tiny; \
+} while (0)
-static __COMP_NPY_UNUSED npy_float tiny = 3.9443045e-31f;
+static const volatile npy_float tiny = 3.9443045e-31f;
/**begin repeat