[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: pacify Sun C 5.9
From: |
Paul Eggert |
Subject: |
[PATCH] tests: pacify Sun C 5.9 |
Date: |
Wed, 4 Nov 2020 15:14:36 -0800 |
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 fc36c1dae..f30e1489b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2020-11-04 Paul Eggert <eggert@cs.ucla.edu>
+ 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 de6cd998b..4d207f1be 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 19bdb55de..6dbf4766c 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 fd6083a58..f07aaf4c6 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.25.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] tests: pacify Sun C 5.9,
Paul Eggert <=