From bd90572c031a25e559907ae0c2b9fd3aa632893b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 4 Nov 2020 15:13:40 -0800 Subject: [PATCH] tests: pacify Sun C 5.9 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Without these changes, Sun C 5.9 (2009/11/22) issues complaints like “"test-nl_langinfo-mt.c", line 75: warning: statement not reached”. * tests/test-nl_langinfo-mt.c (thread1_func, thread2_func) (thread3_func, thread4_func, thread5_func, thread6_func, threadN_func): * tests/test-setlocale_null-mt-all.c (thread1_func, thread2_func): * tests/test-setlocale_null-mt-one.c (thread1_func, thread2_func): Remove unreachable ‘return NULL;’s. --- ChangeLog | 9 +++++++++ tests/test-nl_langinfo-mt.c | 7 ------- tests/test-setlocale_null-mt-all.c | 2 -- tests/test-setlocale_null-mt-one.c | 2 -- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index fc36c1daea..f30e1489b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2020-11-04 Paul Eggert + tests: pacify Sun C 5.9 + Without these changes, Sun C 5.9 (2009/11/22) issues complaints like + “"test-nl_langinfo-mt.c", line 75: warning: statement not reached”. + * tests/test-nl_langinfo-mt.c (thread1_func, thread2_func) + (thread3_func, thread4_func, thread5_func, thread6_func, threadN_func): + * tests/test-setlocale_null-mt-all.c (thread1_func, thread2_func): + * tests/test-setlocale_null-mt-one.c (thread1_func, thread2_func): + Remove unreachable ‘return NULL;’s. + tests: port better to XLC 12.01 * tests/test-argmatch.c (CHECK): Do not use -1 as a subscript, even in code that is not executed, as IBM XLC 12.01 complains "The diff --git a/tests/test-nl_langinfo-mt.c b/tests/test-nl_langinfo-mt.c index de6cd998b7..4d207f1be9 100644 --- a/tests/test-nl_langinfo-mt.c +++ b/tests/test-nl_langinfo-mt.c @@ -72,7 +72,6 @@ thread1_func (void *arg) } /*NOTREACHED*/ - return NULL; } static char *expected2; @@ -91,7 +90,6 @@ thread2_func (void *arg) } /*NOTREACHED*/ - return NULL; } static char *expected3; @@ -110,7 +108,6 @@ thread3_func (void *arg) } /*NOTREACHED*/ - return NULL; } static char *expected4; @@ -129,7 +126,6 @@ thread4_func (void *arg) } /*NOTREACHED*/ - return NULL; } static char *expected5; @@ -148,7 +144,6 @@ thread5_func (void *arg) } /*NOTREACHED*/ - return NULL; } static char *expected6; @@ -167,7 +162,6 @@ thread6_func (void *arg) } /*NOTREACHED*/ - return NULL; } static void * @@ -188,7 +182,6 @@ threadN_func (void *arg) } /*NOTREACHED*/ - return NULL; } int diff --git a/tests/test-setlocale_null-mt-all.c b/tests/test-setlocale_null-mt-all.c index 19bdb55de6..6dbf4766c6 100644 --- a/tests/test-setlocale_null-mt-all.c +++ b/tests/test-setlocale_null-mt-all.c @@ -78,7 +78,6 @@ thread1_func (void *arg) } /*NOTREACHED*/ - return NULL; } static void * @@ -93,7 +92,6 @@ thread2_func (void *arg) } /*NOTREACHED*/ - return NULL; } int diff --git a/tests/test-setlocale_null-mt-one.c b/tests/test-setlocale_null-mt-one.c index fd6083a58d..f07aaf4c60 100644 --- a/tests/test-setlocale_null-mt-one.c +++ b/tests/test-setlocale_null-mt-one.c @@ -78,7 +78,6 @@ thread1_func (void *arg) } /*NOTREACHED*/ - return NULL; } static void * @@ -93,7 +92,6 @@ thread2_func (void *arg) } /*NOTREACHED*/ - return NULL; } int -- 2.39.5