Discussion:
sys_file tests: avoid warning
(too old to reply)
Bruno Haible
2017-04-22 13:01:01 UTC
Permalink
Raw Message
On Mac OS X, with CPPFLAGS=-Wall, I'm seeing this warning:


test-sys_file.c:26:11: warning: no case matching constant switch condition '0'
switch (0)
^

This fixes it:


2017-04-22 Bruno Haible <***@clisp.org>

sys_file tests: Avoid warning.
* tests/test-sys_file.c (main): Add a default clause to the switch
statement.

diff --git a/tests/test-sys_file.c b/tests/test-sys_file.c
index 3be1e57..6394c77 100644
--- a/tests/test-sys_file.c
+++ b/tests/test-sys_file.c
@@ -30,6 +30,8 @@ main (void)
case LOCK_NB:
case LOCK_UN:
;
+ default:
+ ;
}
return 0;
}

Loading...