about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsteve ellcey-CA Eng-Software <sellcey@sellcey-thinkpad.caveonetworks.com>2016-10-14 12:53:27 -0700
committerFlorian Weimer <fweimer@redhat.com>2017-10-07 13:39:15 +0200
commitb3c498b834c112c10831dced77c9409cb79f339e (patch)
treeb4c2936795825e003d11b0d21362fe1483d9d40b
parentb70f43dcef0ca638d2d550ead8007f7c9bb7e4bb (diff)
downloadglibc-b3c498b834c112c10831dced77c9409cb79f339e.tar.gz
glibc-b3c498b834c112c10831dced77c9409cb79f339e.tar.xz
glibc-b3c498b834c112c10831dced77c9409cb79f339e.zip
Fix warnings from latest GCC.
	* sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly
	boolean.

(cherry picked from commit e223d1fe72e820d96f43831412ab267a1ace04d0)
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/ieee754/dbl-64/e_pow.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 80cb667dd2..30dbdf1fd9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-14  Steve Ellcey  <sellcey@caviumnetworks.com>
+
+	* sysdeps/ieee754/dbl-64/e_pow.c (checkint) Make conditions explicitly
+	boolean.
+
 2017-07-19  DJ Delorie  <dj@delorie.com>
 
 	[BZ #21654]
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;
 }