Port to gcc -Wimplicit-fallthrough=5

* src/common.h (FALLTHROUGH): New macro, for use with gcc
-Wimplicit-fallthrough=5, which is now the default when used with
Gnulib after commit 2017-05-16T16:23:52!eggert@cs.ucla.edu
and with --enable-gcc-warnings
This commit is contained in:
Paul Eggert
2017-11-18 08:42:23 -08:00
parent 0c8e7bad3e
commit d44d592013
10 changed files with 45 additions and 50 deletions
+4 -7
View File
@@ -187,8 +187,7 @@ delete_archive_members (void)
skip_member ();
break;
}
/* Fall through. */
FALLTHROUGH;
case HEADER_SUCCESS_EXTENDED:
logical_status = status;
break;
@@ -199,7 +198,7 @@ delete_archive_members (void)
set_next_block_after (current_header);
break;
}
/* Fall through. */
FALLTHROUGH;
case HEADER_END_OF_FILE:
logical_status = HEADER_END_OF_FILE;
break;
@@ -210,14 +209,12 @@ delete_archive_members (void)
{
case HEADER_STILL_UNREAD:
WARN ((0, 0, _("This does not look like a tar archive")));
/* Fall through. */
FALLTHROUGH;
case HEADER_SUCCESS:
case HEADER_SUCCESS_EXTENDED:
case HEADER_ZERO_BLOCK:
ERROR ((0, 0, _("Skipping to next header")));
/* Fall through. */
FALLTHROUGH;
case HEADER_FAILURE:
break;