[PATCH 0/4] appeasing -Wimplicit-fallthrough

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

 



I noticed that gcc 7 ships with a new implicit-fallthrough warning that
tries to find accidental switch-case fallthroughs. It's enabled with
-Wextra, or you can turn it on separately. I don't think it finds any
real bugs in the current code, but it does seem like something that's
potentially worth paying attention to.

So here's a series that squelches the false positives. The first patch
is a real bug-fix that I found while poking around, and can be taken
separately.  The middle ones improve code readability, IMHO. And the
final one just annotates the code to shut up the compiler warning.

  [1/4]: cat-file: handle NULL object_context.path
  [2/4]: test-line-buffer: simplify command parsing
  [3/4]: curl_trace(): eliminate switch fallthrough
  [4/4]: consistently use "fallthrough" comments in switches

 apply.c                     |  3 ++-
 builtin/cat-file.c          |  5 +++--
 builtin/checkout.c          |  1 +
 builtin/remote-ext.c        |  2 +-
 builtin/submodule--helper.c |  1 +
 config.c                    |  1 +
 convert.c                   |  3 ++-
 fsck.c                      |  1 +
 http-push.c                 |  1 +
 http.c                      |  7 ++++---
 mailinfo.c                  |  1 +
 quote.c                     |  1 +
 read-cache.c                |  1 +
 send-pack.c                 |  2 +-
 t/helper/test-line-buffer.c | 32 +++++++++++---------------------
 t/t8010-cat-file-filters.sh |  5 +++++
 16 files changed, 37 insertions(+), 30 deletions(-)




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux