[uclibc-ng-devel] [PATCH] libpthread/nptl: bugfix compile warning.

Guo Ren ren_guo at c-sky.com
Mon Oct 9 16:57:45 CEST 2017


warning: unused variable 'self' [-Wunused-variable]

Signed-off-by: Guo Ren <ren_guo at c-sky.com>
---
 libpthread/nptl/sysdeps/unix/sysv/linux/fork.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c b/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
index 8b4b036..9b96152 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
@@ -144,9 +144,7 @@ fork (void)
 
   if (pid == 0)
     {
-      struct pthread *self = THREAD_SELF;
-
-      assert (THREAD_GETMEM (self, tid) != ppid);
+      assert (THREAD_GETMEM (THREAD_SELF, tid) != ppid);
 
       if (__fork_generation_pointer != NULL)
 	*__fork_generation_pointer += 4;
-- 
2.7.4



More information about the devel mailing list