bug-gnulib
[Top][All Lists]
Advanced

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

sys_file tests: avoid warning


From: Bruno Haible
Subject: sys_file tests: avoid warning
Date: Sat, 22 Apr 2017 15:01:01 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-72-generic; KDE/5.18.0; x86_64; ; )

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  <address@hidden>

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




reply via email to

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