]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
S/390: Get rid of warning: the comparision will always evaluate as false.
authorStefan Liebler <stli@linux.vnet.ibm.com>
Thu, 13 Nov 2014 09:42:31 +0000 (10:42 +0100)
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Thu, 13 Nov 2014 09:43:24 +0000 (10:43 +0100)
ChangeLog
sysdeps/s390/s390-32/backtrace.c
sysdeps/s390/s390-64/backtrace.c

index f6fe1fa4c31429705e550afc1bb0584f96043f78..a6711e194b0e10065ddf5be9f410a81272d14985 100644 (file)
--- 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]
index 3ade10c85b707f2aa74b995a3b8e62d0d3c977bf..e3122cf1fc533f47b4ca92a22d665f83fa38ea49 100644 (file)
@@ -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);
index 39a15e0f0f3a375e30ad29bbe11757072a8ab2c5..74b558199696383938d89f397ef90213fb4b2176 100644 (file)
@@ -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);