Bernhard Voelker wrote: > As discussed in > https://lists.gnu.org/archive/html/bug-coreutils/2011-07/msg00195.html > empty statements must follow a jump label if the next statement > is a declaration. Therefore, the other way round: the empty statement > can be omitted when no declaration follows. > > Have a nice day, > Berny > > > From b7e72c789eac010bcd1666dbb25f7ec4e5332137 Mon Sep 17 00:00:00 2001 > From: Bernhard Voelker <[email protected]> > Date: Mon, 25 Jul 2011 18:39:28 +0200 > Subject: [PATCH] maint: remove empty statement after jump label > > * src/head.c: removed the empty statement ";" after a jump label, > as it is only needed when a declaration follows. > * src/kill.c, src/od.c, src/paste.c, src/printf.c: Likewise.
I've applied that. Note that your patch was broken (3 @@... lines were split by your mail client) and I've adjusted the log to include function names. We could also have decided to add the trailing ";" everywhere, in the interest of having something consistent and syntactically-easy to check. However, not only would adding all of those ";"s have been invasive, but I prefer the minimal policy of using the added ";" only when required. >From 036a9c69099f372ca581ce8b5c22e88656a2b478 Mon Sep 17 00:00:00 2001 From: Bernhard Voelker <[email protected]> Date: Mon, 25 Jul 2011 18:39:28 +0200 Subject: [PATCH] maint: remove empty statement after jump label * src/head.c (elide_tail_bytes_pipe): Remove the empty statement, ";" after a jump label; it is needed only when a declaration follows. * src/kill.c (main): Likewise. * src/od.c (main): Likewise. * src/paste.c (collapse_escapes): Likewise. * src/printf.c (print_formatted): Likewise. --- src/head.c | 2 +- src/kill.c | 2 +- src/od.c | 2 +- src/paste.c | 2 +- src/printf.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/head.c b/src/head.c index 1c6e6bc..1742912 100644 --- a/src/head.c +++ b/src/head.c @@ -389,7 +389,7 @@ elide_tail_bytes_pipe (const char *filename, int fd, uintmax_t n_elide_0) } } - free_mem:; + free_mem: for (i = 0; i < n_bufs; i++) free (b[i]); free (b); diff --git a/src/kill.c b/src/kill.c index b94e68c..9f95114 100644 --- a/src/kill.c +++ b/src/kill.c @@ -292,7 +292,7 @@ main (int argc, char **argv) default: usage (EXIT_FAILURE); } - no_more_options:; + no_more_options: if (signum < 0) signum = SIGTERM; diff --git a/src/od.c b/src/od.c index 9ddd519..2f3593e 100644 --- a/src/od.c +++ b/src/od.c @@ -1905,7 +1905,7 @@ it must be one character from [doxn]"), ok &= (flag_dump_strings ? dump_strings () : dump ()); -cleanup:; +cleanup: if (have_read_stdin && fclose (stdin) == EOF) error (EXIT_FAILURE, errno, _("standard input")); diff --git a/src/paste.c b/src/paste.c index 217357f..17aacd4 100644 --- a/src/paste.c +++ b/src/paste.c @@ -145,7 +145,7 @@ collapse_escapes (char const *strptr) } } - done:; + done: delim_end = strout; return backslash_at_end ? 1 : 0; diff --git a/src/printf.c b/src/printf.c index 24070b8..ddb6c46 100644 --- a/src/printf.c +++ b/src/printf.c @@ -533,7 +533,7 @@ print_formatted (const char *format, int argc, char **argv) default: goto no_more_flag_characters; } - no_more_flag_characters:; + no_more_flag_characters: if (*f == '*') { -- 1.7.6.433.g1421f
