瀏覽代碼

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 5 年之前
父節點
當前提交
4acf6f072c
共有 1 個文件被更改,包括 2 次插入0 次删除
  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);