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

Message ID 1507561065-17658-1-git-send-email-ren_guo@c-sky.com
State New
Headers show
Series
  • [uclibc-ng-devel] libpthread/nptl: bugfix compile warning.
Related show

Commit Message

Guo Ren Oct. 9, 2017, 2:57 p.m.
warning: unused variable 'self' [-Wunused-variable]

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

Comments

Waldemar Brodkorb Oct. 10, 2017, 5:11 p.m. | #1
Hi,
Guo Ren wrote,

> warning: unused variable 'self' [-Wunused-variable]
> 
> Signed-off-by: Guo Ren <ren_guo@c-sky.com>

Thanks, applied and pushed,
 best regards
  Waldemar

Patch

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;