* lib/savewd.c (FALLTHROUGH): Define.
(savewd_save, savewd_restore): Use this, rather than a comment,
whenever one switch case falls through into the next.
+2017-06-10 Jim Meyering <meyering@fb.com>
+
+ maint: update to work with GCC7's -Werror=implicit-fallthrough=
+ * lib/savewd.c (FALLTHROUGH): Define.
+ (savewd_save, savewd_restore): Use this, rather than a comment,
+ whenever one switch case falls through into the next.
+
2017-06-08 Bruno Haible <bruno@clisp.org>
host-cpu-c-abi: Support for aarch64 ILP32 ABI.
#include "dosname.h"
#include "fcntl-safer.h"
+#ifndef FALLTHROUGH
+# if __GNUC__ < 7
+# define FALLTHROUGH ((void) 0)
+# else
+# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+#endif
+
/* Save the working directory into *WD, if it hasn't been saved
already. Return true if a child has been forked to do the real
work. */
}
wd->state = FORKING_STATE;
wd->val.child = -1;
- /* Fall through. */
+ FALLTHROUGH;
case FORKING_STATE:
if (wd->val.child < 0)
{
wd->state = ERROR_STATE;
wd->val.errnum = chdir_errno;
}
- /* Fall through. */
+ FALLTHROUGH;
case ERROR_STATE:
/* Report an error if asked to restore the working directory. */
errno = wd->val.errnum;