Clang shows the following warning:
src/ptx.c:792:11: warning: unannotated fall-through between switch labels
[-Wimplicit-fallthrough]
792 | case -1:
| ^
src/ptx.c:792:11: note: insert 'break;' to avoid fall-through
792 | case -1:
| ^
| break;
The fix is to mark matcher_error with _Noreturn as Paul did for some
other functions with commit bcc479b0b (maint: mark some _Noreturn
functions, 2022-01-31).
Interestingly gcc doesn't show it. Maybe it adds it implicitly upon
seeing the functiononly calls error (EXIT_FAILURE, ...)?
-- 8< --
* src/ptx.c (matcher_error): Mark with _Noreturn.
---
src/ptx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ptx.c b/src/ptx.c
index 4290d900c..bb9683e06 100644
--- a/src/ptx.c
+++ b/src/ptx.c
@@ -283,7 +283,7 @@ static BLOCK reference; /* reference field for
input reference mode */
/* Diagnose an error in the regular expression matcher. Then exit. */
-static void
+static _Noreturn void
matcher_error (void)
{
error (EXIT_FAILURE, errno, _("error in regular expression matcher"));
--
2.55.0