coreutils
[Top][All Lists]
Advanced

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

[PATCH] maint: remove empty statement after jump label


From: Bernhard Voelker
Subject: [PATCH] maint: remove empty statement after jump label
Date: Mon, 25 Jul 2011 19:59:33 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11

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



reply via email to

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