diff mbox series

[uclibc-ng-devel,6/6] Fix warning due to unused label in NPTL

Message ID 20200922121703.12838-7-ysionneau@kalray.eu
State Accepted
Headers show
Series Warning fixes | expand

Commit Message

Yann Sionneau Sept. 22, 2020, 12:17 p.m. UTC
Fixes this:

In file included from libpthread/nptl/pthread_create.c:48:0:
libpthread/nptl/allocatestack.c: In function 'allocate_stack':
libpthread/nptl/allocatestack.c:602:6: warning: label 'mprot_error' defined but not used [-Wunused-label]
      mprot_error:
      ^~~~~~~~~~~

Signed-off-by: Yann Sionneau <ysionneau@kalray.eu>
---
 libpthread/nptl/allocatestack.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/libpthread/nptl/allocatestack.c b/libpthread/nptl/allocatestack.c
index 137979542..7ef884543 100644
--- a/libpthread/nptl/allocatestack.c
+++ b/libpthread/nptl/allocatestack.c
@@ -599,7 +599,9 @@  allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
 	  if (mprotect (guard, guardsize, PROT_NONE) != 0)
 	    {
 	      int err;
+#ifdef NEED_SEPARATE_REGISTER_STACK
 	    mprot_error:
+#endif
 	      err = errno;
 
 	      lll_lock (stack_cache_lock, LLL_PRIVATE);