summaryrefslogtreecommitdiff
path: root/patches/glibc/2.20/930-explicit-boolean.patch
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-05-14 16:51:28 (GMT)
committerGitHub <noreply@github.com>2017-05-14 16:51:28 (GMT)
commitef762bfe8e1ec9063d645b1745dc8843997b7767 (patch)
treeb0a2fecc4e9b70316b134cb6202644824599f08f /patches/glibc/2.20/930-explicit-boolean.patch
parent968b6918a2e00134077a2603f33451cfa617f44d (diff)
parent842915db44b2a41486dc5ea0212ddfc19093fe32 (diff)
Merge pull request #716 from stilor/gcc7
Add GCC 7.1.0
Diffstat (limited to 'patches/glibc/2.20/930-explicit-boolean.patch')
-rw-r--r--patches/glibc/2.20/930-explicit-boolean.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/patches/glibc/2.20/930-explicit-boolean.patch b/patches/glibc/2.20/930-explicit-boolean.patch
new file mode 100644
index 0000000..780fae6
--- /dev/null
+++ b/patches/glibc/2.20/930-explicit-boolean.patch
@@ -0,0 +1,33 @@
+commit e223d1fe72e820d96f43831412ab267a1ace04d0
+Author: steve ellcey-CA Eng-Software <sellcey@sellcey-thinkpad.caveonetworks.com>
+Date: Fri Oct 14 12:53:27 2016 -0700
+
+ Fix warnings from latest GCC.
+
+ * sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly
+ boolean.
+
+diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c
+index 663fa392c2..bd758b5979 100644
+--- a/sysdeps/ieee754/dbl-64/e_pow.c
++++ b/sysdeps/ieee754/dbl-64/e_pow.c
+@@ -466,15 +466,15 @@ checkint (double x)
+ return (n & 1) ? -1 : 1; /* odd or even */
+ if (k > 20)
+ {
+- if (n << (k - 20))
++ if (n << (k - 20) != 0)
+ return 0; /* if not integer */
+- return (n << (k - 21)) ? -1 : 1;
++ return (n << (k - 21) != 0) ? -1 : 1;
+ }
+ if (n)
+ return 0; /*if not integer */
+ if (k == 20)
+ return (m & 1) ? -1 : 1;
+- if (m << (k + 12))
++ if (m << (k + 12) != 0)
+ return 0;
+- return (m << (k + 11)) ? -1 : 1;
++ return (m << (k + 11) != 0) ? -1 : 1;
+ }