]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: Re-enable -Wimplicit-fallthrough
authorTim Duesterhus <tim@bastelstu.be>
Fri, 29 May 2020 12:35:51 +0000 (14:35 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 14:49:37 +0000 (16:49 +0200)
commit588b3148d9e49a2c0ba4a12f4c11b6a9c5426d45
tree43dc910cb7c392ab44c486d61c6ea45aa30953ac
parent2fc761e827071c4b976403e69836ff063994ee14
BUILD: Re-enable -Wimplicit-fallthrough

Getting rid of this warning is cleaner solved using a 'fall through' comment,
because it clarifies intent to a human reader.

This patch adjust a few places that cause -Wimplicit-fallthrough to trigger:

- Fix typos in the comment.
- Remove redundant 'no break' that trips up gcc from comment.
- Move the comment out of the block when the 'case' is completely surrounded
  by braces.
- Add comments where I could determine that the fall through was intentional.

Changes tested on

    gcc (Debian 9.3.0-13) 9.3.0
    Copyright (C) 2019 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

using

    make -j4 all TARGET=linux-glibc USE_OPENSSL=1 USE_LUA=1 USE_ZLIB=1 USE_PCRE2=1 USE_PCRE2_JIT=1 USE_GETADDRINFO=1
Makefile
src/acl.c
src/check.c
src/cli.c
src/hlua.c
src/peers.c
src/stream_interface.c
src/tcpcheck.c