diff options
-rw-r--r-- | disk-utils/mkfs.cramfs.c | 2 | ||||
-rw-r--r-- | login-utils/last.c | 2 | ||||
-rw-r--r-- | login-utils/su-common.c | 1 | ||||
-rw-r--r-- | login-utils/sulogin.c | 7 | ||||
-rw-r--r-- | misc-utils/cal.c | 4 | ||||
-rw-r--r-- | misc-utils/rename.c | 1 | ||||
-rw-r--r-- | sys-utils/flock.c | 2 | ||||
-rw-r--r-- | sys-utils/hwclock.c | 3 | ||||
-rw-r--r-- | sys-utils/ipcrm.c | 3 | ||||
-rw-r--r-- | sys-utils/nsenter.c | 2 | ||||
-rw-r--r-- | sys-utils/unshare.c | 2 | ||||
-rw-r--r-- | term-utils/agetty.c | 4 | ||||
-rw-r--r-- | text-utils/hexdump-parse.c | 2 | ||||
-rw-r--r-- | text-utils/more.c | 5 | ||||
-rw-r--r-- | text-utils/pg.c | 4 | ||||
-rw-r--r-- | text-utils/ul.c | 4 |
16 files changed, 26 insertions, 22 deletions
diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c index f277aaf23..77b4467e7 100644 --- a/disk-utils/mkfs.cramfs.c +++ b/disk-utils/mkfs.cramfs.c @@ -123,7 +123,7 @@ struct entry { #define CRAMFS_OFFSET_WIDTH 26 /* Input status of 0 to print help and exit without an error. */ -static void +static void __attribute__((__noreturn__)) usage(int status) { FILE *stream = status ? stderr : stdout; diff --git a/login-utils/last.c b/login-utils/last.c index c90b574e5..50451b2e2 100644 --- a/login-utils/last.c +++ b/login-utils/last.c @@ -830,7 +830,7 @@ static void process_wtmp_file(const struct last_control *ctl, c = whydown; quit = list(ctl, &ut, lastboot, c); } - /* FALLTHRU */ + /* fallthrough */ case DEAD_PROCESS: /* diff --git a/login-utils/su-common.c b/login-utils/su-common.c index 0999795c8..032d62f9f 100644 --- a/login-utils/su-common.c +++ b/login-utils/su-common.c @@ -899,6 +899,7 @@ su_main (int argc, char **argv, int mode) /* fallthrough if -u <user> is not specified, then follow * traditional su(1) behavior */ + /* fallthrough */ case SU_MODE: if (optind < argc) new_user = argv[optind++]; diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c index 2487838e7..72bba623a 100644 --- a/login-utils/sulogin.c +++ b/login-utils/sulogin.c @@ -267,11 +267,11 @@ static void tcfinal(struct console *con) break; case 1: /* odd parity */ tio->c_cflag |= PARODD; - /* fall through */ + /* fallthrough */ case 2: /* even parity */ tio->c_cflag |= PARENB; tio->c_iflag |= (INPCK | ISTRIP); - /* fall through */ + /* fallthrough */ case (1 | 2): /* no parity bit */ tio->c_cflag &= ~CSIZE; tio->c_cflag |= CS7; @@ -971,7 +971,6 @@ int main(int argc, char **argv) switch ((con->pid = fork())) { case 0: mask_signal(SIGCHLD, SIG_DFL, NULL); - /* fall through */ nofork: setup(con); while (1) { @@ -1024,7 +1023,7 @@ int main(int argc, char **argv) exit(0); case -1: warn(_("fork failed")); - /* fall through */ + /* fallthrough */ default: break; } diff --git a/misc-utils/cal.c b/misc-utils/cal.c index 604eb26a7..86e159bfa 100644 --- a/misc-utils/cal.c +++ b/misc-utils/cal.c @@ -431,7 +431,7 @@ int main(int argc, char **argv) ctl.req.day = strtos32_or_err(*argv++, _("illegal day value")); if (ctl.req.day < 1 || DAYS_IN_MONTH < ctl.req.day) errx(EXIT_FAILURE, _("illegal day value: use 1-%d"), DAYS_IN_MONTH); - /* FALLTHROUGH */ + /* fallthrough */ case 2: if (isdigit(**argv)) ctl.req.month = strtos32_or_err(*argv++, _("illegal month value: use 1-12")); @@ -443,7 +443,7 @@ int main(int argc, char **argv) } if (ctl.req.month < 1 || MONTHS_IN_YEAR < ctl.req.month) errx(EXIT_FAILURE, _("illegal month value: use 1-12")); - /* FALLTHROUGH */ + /* fallthrough */ case 1: ctl.req.year = strtos32_or_err(*argv++, _("illegal year value")); if (ctl.req.year < SMALLEST_YEAR) diff --git a/misc-utils/rename.c b/misc-utils/rename.c index 65ac543ef..b06a2d969 100644 --- a/misc-utils/rename.c +++ b/misc-utils/rename.c @@ -189,7 +189,6 @@ int main(int argc, char **argv) return EXIT_SUCCESS; case 'h': usage(stdout); - /* fallthrough */ default: errtryhelp(EXIT_FAILURE); } diff --git a/sys-utils/flock.c b/sys-utils/flock.c index 8af1e8ade..50194bdb9 100644 --- a/sys-utils/flock.c +++ b/sys-utils/flock.c @@ -305,7 +305,7 @@ int main(int argc, char *argv[]) if (open_flags & O_RDWR) break; } - /* go through */ + /* fallthrough */ default: /* Other errors */ if (filename) diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index cfb6bcd6b..55f54f5ee 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -1209,7 +1209,8 @@ static void out_version(void) * fmt, ... ), show a usage information and terminate the program * afterwards. */ -static void usage(const struct hwclock_control *ctl, const char *fmt, ...) +static void __attribute__((__noreturn__)) +usage(const struct hwclock_control *ctl, const char *fmt, ...) { FILE *usageto; va_list ap; diff --git a/sys-utils/ipcrm.c b/sys-utils/ipcrm.c index 0432b224f..5b71f7d81 100644 --- a/sys-utils/ipcrm.c +++ b/sys-utils/ipcrm.c @@ -346,6 +346,7 @@ int main(int argc, char **argv) ret++; break; } + /* fallthrough */ case 'm': if (!iskey) id = strtos32_or_err(optarg, _("failed to parse argument")); @@ -359,6 +360,7 @@ int main(int argc, char **argv) ret++; break; } + /* fallthrough */ case 'q': if (!iskey) id = strtos32_or_err(optarg, _("failed to parse argument")); @@ -372,6 +374,7 @@ int main(int argc, char **argv) ret++; break; } + /* fallthrough */ case 's': if (!iskey) id = strtos32_or_err(optarg, _("failed to parse argument")); diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c index afa1b9c50..6ad0b0fe0 100644 --- a/sys-utils/nsenter.c +++ b/sys-utils/nsenter.c @@ -65,7 +65,7 @@ static struct namespace_file { { .nstype = 0, .name = NULL, .fd = -1 } }; -static void usage(int status) +static void __attribute__((__noreturn__)) usage(int status) { FILE *out = status == EXIT_SUCCESS ? stdout : stderr; diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c index bccd75f3a..6c5c2e2f9 100644 --- a/sys-utils/unshare.c +++ b/sys-utils/unshare.c @@ -238,7 +238,7 @@ static void bind_ns_files_from_child(pid_t *child, int fds[2]) } } -static void usage(int status) +static void __attribute__((__noreturn__)) usage(int status) { FILE *out = status == EXIT_SUCCESS ? stdout : stderr; diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 93a3843c7..938fa2f97 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -2041,12 +2041,12 @@ static void termio_final(struct options *op, struct termios *tp, struct chardata case 1: /* odd parity */ tp->c_cflag |= PARODD; - /* do not break */ + /* fallthrough */ case 2: /* even parity */ tp->c_cflag |= PARENB; tp->c_iflag |= INPCK | ISTRIP; - /* do not break */ + /* fallthrough */ case (1 | 2): /* no parity bit */ tp->c_cflag &= ~CSIZE; diff --git a/text-utils/hexdump-parse.c b/text-utils/hexdump-parse.c index c60a4d06b..2b2735bf7 100644 --- a/text-utils/hexdump-parse.c +++ b/text-utils/hexdump-parse.c @@ -351,7 +351,7 @@ isint: cs[3] = '\0'; case 'A': endfu = fu; fu->flags |= F_IGNORE; - /* FALLTHROUGH */ + /* fallthrough */ case 'a': pr->flags = F_ADDRESS; ++p2; diff --git a/text-utils/more.c b/text-utils/more.c index 72dd96bf4..c0c2e8743 100644 --- a/text-utils/more.c +++ b/text-utils/more.c @@ -1270,7 +1270,7 @@ int command(char *filename, register FILE *f) break; } lastp++; - /* fall through */ + /* fallthrough */ case '/': if (nlines == 0) nlines++; @@ -1368,7 +1368,7 @@ int command(char *filename, register FILE *f) (char *)0); break; } - /* fall through */ + /* fallthrough */ default: if (dum_opt) { kill_line(); @@ -2023,6 +2023,7 @@ int expand(char **outbuf, char *inbuf) *outstr++ = *inpstr++; break; } + /* fallthrough */ default: *outstr++ = c; } diff --git a/text-utils/pg.c b/text-utils/pg.c index 1b9b8d7dd..50fd3c379 100644 --- a/text-utils/pg.c +++ b/text-utils/pg.c @@ -659,7 +659,7 @@ static void prompt(long long pageno) break; case SEARCH_FIN: state = SEARCH; - /* FALLTHRU */ + /* fallthrough */ case SEARCH: if (cmd.cmdline[cmd.cmdlen - 1] == '\\') { escape = 1; @@ -738,7 +738,7 @@ static void prompt(long long pageno) continue; } state = COUNT; - /* FALLTHRU */ + /* fallthrough */ case COUNT: break; case ADDON_FIN: diff --git a/text-utils/ul.c b/text-utils/ul.c index 3986b4206..736483ef4 100644 --- a/text-utils/ul.c +++ b/text-utils/ul.c @@ -208,7 +208,7 @@ int main(int argc, char **argv) default: warnx(_("trouble reading terminfo")); - /* fall through to ... */ + /* fallthrough */ case 0: if (tflag) @@ -317,7 +317,7 @@ static void filter(FILE *f) } obuf[col].c_char = '_'; obuf[col].c_width = 1; - /* fall through */ + /* fallthrough */ case ' ': setcol(col + 1); continue; |