From: Stefan Liebler Date: Wed, 26 Jun 2019 10:29:50 +0000 (+0200) Subject: Fix build warnings in nptl/tst-eintr1.c X-Git-Tag: glibc-2.30~69 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c78b3f55d12c3599c5492b1883a48e5e3c391ccf;p=thirdparty%2Fglibc.git Fix build warnings in nptl/tst-eintr1.c This patch fixes the gcc warnings seen with gcc 9.1 -O3 on s390x: tst-eintr1.c: In function ‘tf1’: tst-eintr1.c:46:1: error: no return statement in function returning non-void [-Werror=return-type] 46 | } | ^ tst-eintr1.c: In function ‘do_test’: tst-eintr1.c:57:17: error: unused variable ‘th’ [-Werror=unused-variable] 57 | pthread_t th = xpthread_create (NULL, tf1, NULL); | ^~ ChangeLog: * nptl/tst-eintr1.c (tf1): Add return statement. (do_test): Remove unused th variable. --- diff --git a/ChangeLog b/ChangeLog index adc58e4a14a..2e54659370f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2019-06-26 Stefan Liebler + + * nptl/tst-eintr1.c (tf1): Add return statement. + (do_test): Remove unused th variable. + 2019-06-26 Stefan Liebler * locale/programs/ld-ctype.c (charclass_symbolic_ellipsis): diff --git a/nptl/tst-eintr1.c b/nptl/tst-eintr1.c index b60b796d619..11404ff7ff5 100644 --- a/nptl/tst-eintr1.c +++ b/nptl/tst-eintr1.c @@ -43,6 +43,7 @@ tf1 (void *arg) pthread_t th = xpthread_create (NULL, tf2, NULL); xpthread_join (th); } + return NULL; } @@ -53,9 +54,7 @@ do_test (void) int i; for (i = 0; i < 10; ++i) - { - pthread_t th = xpthread_create (NULL, tf1, NULL); - } + xpthread_create (NULL, tf1, NULL); delayed_exit (3); /* This call must never return. */