* src/system.h (FALLTHROUGH): Define.
* src/cp.c (main): Use new FALLTHROUGH macro in place of comments.
* src/basename.c (main): Likewise.
* src/dircolors.c (append_quoted): Likewise.
* src/echo.c (main): Likewise.
* src/fold.c (main): Likewise.
* src/join.c (main): Likewise.
* src/kill.c (main): Likewise.
* src/ls.c (get_funky_string, gobble_file): Likewise.
* src/sort.c (parse_field_count, main): Likewise.
* src/stat.c (print_it): Likewise.
* src/tail.c (parse_obsolete_option): Likewise.
* src/test.c (posixtest): Likewise.
* src/wc.c (wc): Likewise.
* src/who.c (main): Likewise.
case 's':
suffix = optarg;
/* -s implies -a, so... */
- /* fall through */
+ FALLTHROUGH;
case 'a':
multiple_names = true;
x.require_preserve = true;
break;
}
- /* fall through */
+ FALLTHROUGH;
case 'p':
x.preserve_ownership = true;
case '=':
if (need_backslash)
APPEND_CHAR ('\\');
- /* Fall through */
+ FALLTHROUGH;
default:
need_backslash = true;
if (! ('0' <= *s && *s <= '7'))
break;
c = *s++;
- /* Fall through. */
+ FALLTHROUGH;
case '1': case '2': case '3':
case '4': case '5': case '6': case '7':
c -= '0';
optargbuf[1] = '\0';
optarg = optargbuf;
}
- /* Fall through. */
+ FALLTHROUGH;
case 'w': /* Line width. */
width = xdectoumax (optarg, 1, SIZE_MAX - TAB_WIDTH - 1, "",
_("invalid number of columns"), 0);
{
case 'v':
print_pairables = false;
- /* Fall through. */
+ FALLTHROUGH;
case 'a':
{
optind--;
goto no_more_options;
}
- /* Fall through. */
+ FALLTHROUGH;
case 'A': case 'B': case 'C': case 'D': case 'E':
case 'F': case 'G': case 'H': case 'I': case 'J':
case 'K': /*case 'L':*/ case 'M': case 'N': case 'O':
usage (EXIT_FAILURE);
}
optarg--;
- /* Fall through. */
+ FALLTHROUGH;
case 'n': /* -n is not documented, but is for Bash compatibility. */
case 's':
if (0 <= signum)
case 'L': /* -L is not documented, but is for procps compatibility. */
case 't':
table = true;
- /* Fall through. */
+ FALLTHROUGH;
case 'l':
if (list)
{
state = ST_END; /* End */
break;
}
- /* else fall through */
+ FALLTHROUGH;
default:
*(q++) = *(p++);
++count;
directory, and --dereference-command-line-symlink-to-dir is
in effect. Fall through so that we call lstat instead. */
}
- /* fall through */
+ FALLTHROUGH;
default: /* DEREF_NEVER */
err = lstat (absolute_name, &f->stat);
*val = n;
if (*val == n)
break;
- /* Fall through. */
+ FALLTHROUGH;
case LONGINT_OVERFLOW:
case LONGINT_OVERFLOW | LONGINT_INVALID_SUFFIX_CHAR:
*val = SIZE_MAX;
case SORT_OPTION:
c = XARGMATCH ("--sort", optarg, sort_args, sort_types);
- /* Fall through. */
+ FALLTHROUGH;
case 'b':
case 'd':
case 'f':
c = (optarg
? XARGMATCH ("--check", optarg, check_args, check_types)
: 'c');
- /* Fall through. */
+ FALLTHROUGH;
case 'c':
case 'C':
if (checkonly && checkonly != c)
{
case '\0':
--b;
- /* fall through */
+ FALLTHROUGH;
case '%':
if (0 < len)
{
quotearg_style (shell_escape_always_quoting_style, arg)
#define quoteaf_n(n, arg) \
quotearg_n_style (n, shell_escape_always_quoting_style, arg)
+
+#ifndef FALLTHROUGH
+# if __GNUC__ < 7
+# define FALLTHROUGH ((void) 0)
+# else
+# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+#endif
switch (*p)
{
- case 'b': default_count *= 512; /* Fall through. */
- case 'c': t_count_lines = false; /* Fall through. */
+ case 'b': default_count *= 512; FALLTHROUGH;
+ case 'c': t_count_lines = false; FALLTHROUGH;
case 'l': p++; break;
}
advance (false);
break;
}
- /* FALLTHROUGH */
+ FALLTHROUGH;
case 5:
default:
if (nargs <= 0)
{
case '\n':
lines++;
- /* Fall through. */
+ FALLTHROUGH;
case '\r':
case '\f':
if (linepos > linelength)
goto mb_word_separator;
case ' ':
linepos++;
- /* Fall through. */
+ FALLTHROUGH;
case '\v':
mb_word_separator:
words += in_word;
{
case '\n':
lines++;
- /* Fall through. */
+ FALLTHROUGH;
case '\r':
case '\f':
if (linepos > linelength)
goto word_separator;
case ' ':
linepos++;
- /* Fall through. */
+ FALLTHROUGH;
case '\v':
word_separator:
words += in_word;
{
case 2: /* who <blurf> <glop> */
my_line_only = true;
- /* Fall through. */
+ FALLTHROUGH;
case -1:
case 0: /* who */
who (UTMP_FILE, READ_UTMP_CHECK_PIDS);