about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.vnet.ibm.com>2014-11-13 10:42:31 +0100
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>2014-11-13 10:43:24 +0100
commit618cebeff82ae775308eb29d7891e22861411e21 (patch)
treed9e959e5c2b33fd6e99a1240b6bcca7c1b4ba5be
parentc6aab2cb524a9c54613f0a4f8310fc1ab48658a8 (diff)
downloadglibc-618cebeff82ae775308eb29d7891e22861411e21.tar.gz
glibc-618cebeff82ae775308eb29d7891e22861411e21.tar.xz
glibc-618cebeff82ae775308eb29d7891e22861411e21.zip
S/390: Get rid of warning: the comparision will always evaluate as false.
-rw-r--r--ChangeLog9
-rw-r--r--sysdeps/s390/s390-32/backtrace.c11
-rw-r--r--sysdeps/s390/s390-64/backtrace.c13
3 files changed, 22 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index f6fe1fa4c3..a6711e194b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-11-13  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
+	* sysdeps/s390/s390-32/backtrace.c (__backtrace):
+	Check for unwind_backtrace ==  NULL only in SHARED case.
+	(__backchain_backtrace): Compile only in SHARED case.
+	* sysdeps/s390/s390-64/backtrace.c (__backtrace):
+	Likewise.
+	(__backchain_backtrace): Declare as static.
+
 2014-11-12  Roland McGrath  <roland@hack.frob.com>
 
 	* nptl/createthread.c [!TLS_MULTIPLE_THREADS_IN_TCB]
diff --git a/sysdeps/s390/s390-32/backtrace.c b/sysdeps/s390/s390-32/backtrace.c
index 3ade10c85b..e3122cf1fc 100644
--- a/sysdeps/s390/s390-32/backtrace.c
+++ b/sysdeps/s390/s390-32/backtrace.c
@@ -77,10 +77,6 @@ init (void)
   if (unwind_getip == NULL)
     unwind_backtrace = NULL;
 }
-#else
-# define unwind_backtrace _Unwind_Backtrace
-# define unwind_getip _Unwind_GetIP
-#endif
 
 static int
 __backchain_backtrace (void **array, int size)
@@ -107,6 +103,10 @@ __backchain_backtrace (void **array, int size)
 
   return cnt;
 }
+#else
+# define unwind_backtrace _Unwind_Backtrace
+# define unwind_getip _Unwind_GetIP
+#endif
 
 static _Unwind_Reason_Code
 backtrace_helper (struct _Unwind_Context *ctx, void *a)
@@ -130,9 +130,10 @@ __backtrace (void **array, int size)
   __libc_once_define (static, once);
 
   __libc_once (once, init);
-#endif
+
   if (unwind_backtrace == NULL)
     return __backchain_backtrace (array, size);
+#endif
 
   if (size >= 1)
     unwind_backtrace (backtrace_helper, &arg);
diff --git a/sysdeps/s390/s390-64/backtrace.c b/sysdeps/s390/s390-64/backtrace.c
index 39a15e0f0f..74b5581996 100644
--- a/sysdeps/s390/s390-64/backtrace.c
+++ b/sysdeps/s390/s390-64/backtrace.c
@@ -76,12 +76,8 @@ init (void)
   if (unwind_getip == NULL)
     unwind_backtrace = NULL;
 }
-#else
-# define unwind_backtrace _Unwind_Backtrace
-# define unwind_getip _Unwind_GetIP
-#endif
 
-int
+static int
 __backchain_backtrace (void **array, int size)
 {
   /* We assume that all the code is generated with frame pointers set.  */
@@ -106,6 +102,10 @@ __backchain_backtrace (void **array, int size)
 
   return cnt;
 }
+#else
+# define unwind_backtrace _Unwind_Backtrace
+# define unwind_getip _Unwind_GetIP
+#endif
 
 static _Unwind_Reason_Code
 backtrace_helper (struct _Unwind_Context *ctx, void *a)
@@ -129,9 +129,10 @@ __backtrace (void **array, int size)
   __libc_once_define (static, once);
 
   __libc_once (once, init);
-#endif
+
   if (unwind_backtrace == NULL)
     return __backchain_backtrace (array, size);
+#endif
 
   if (size >= 1)
     unwind_backtrace (backtrace_helper, &arg);