On FreeBSD, I am seeing compiler warnings:
test-threads.c:42:11: warning: no case matching constant switch condition '0'
test-threads.c:53:11: warning: no case matching constant switch condition '0'

This patch should fix them.


2021-12-24  Bruno Haible  <br...@clisp.org>

        threads-h tests: Avoid clang warnings.
        * tests/test-threads.c (main): Add 'default' to switch statements.

diff --git a/tests/test-threads.c b/tests/test-threads.c
index 4570e19cd..d832ee72a 100644
--- a/tests/test-threads.c
+++ b/tests/test-threads.c
@@ -46,6 +46,7 @@ main (void)
     case thrd_busy:
     case thrd_nomem:
     case thrd_error:
+    default:
       ;
     }
 
@@ -56,6 +57,7 @@ main (void)
     case mtx_timed:
     case mtx_plain | mtx_recursive:
     case mtx_timed | mtx_recursive:
+    default:
       ;
     }
 




Reply via email to