bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* threads-h tests: Avoid clang warnings
@ 2021-12-24 15:39 Bruno Haible
  0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2021-12-24 15:39 UTC (permalink / raw
  To: bug-gnulib

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:
       ;
     }
 





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-24 15:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-24 15:39 threads-h tests: Avoid clang warnings Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).