Browse Source

Fix warning due to unused label in NPTL

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>
Yann Sionneau 3 years ago
parent
commit
4acf6f072c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      libpthread/nptl/allocatestack.c

+ 2 - 0
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);