bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

threads-h tests: Avoid clang warnings


From: Bruno Haible
Subject: threads-h tests: Avoid clang warnings
Date: Fri, 24 Dec 2021 16:39:58 +0100

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  <bruno@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

[Prev in Thread] Current Thread [Next in Thread]