Skip to content

Commit

Permalink
S/390: Get rid of warning: the comparision will always evaluate as fa…
Browse files Browse the repository at this point in the history
…lse.
  • Loading branch information
Stefan Liebler authored and Andreas Krebbel committed Nov 13, 2014
1 parent c6aab2c commit 618cebe
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
11 changes: 6 additions & 5 deletions sysdeps/s390/s390-32/backtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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);
Expand Down
13 changes: 7 additions & 6 deletions sysdeps/s390/s390-64/backtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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)
Expand All @@ -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);
Expand Down

0 comments on commit 618cebe

Please sign in to comment.