]> git.ipfire.org Git - thirdparty/tor.git/commit
Better fix for #40241 (--enable-all-bugs-are-fatal and fallthrough)
authorNick Mathewson <nickm@torproject.org>
Wed, 13 Jan 2021 14:48:00 +0000 (09:48 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 13 Jan 2021 14:54:43 +0000 (09:54 -0500)
commitfa8ecf88202dfe3af9e02331ca9dee6768870911
tree082628fb7330439775abefeec004e2a1eb21bb05
parent6c0f15500b3aa027c90d1c397d4504bb2f4dd41b
Better fix for #40241 (--enable-all-bugs-are-fatal and fallthrough)

This one should work on GCC _and_ on Clang.  The previous version
made Clang happier by not having unreachable "fallthrough"
statements, but made GCC sad because GCC didn't think that the
unconditional failures were really unconditional, and therefore
_wanted_ a FALLTHROUGH.

This patch adds a FALLTHROUGH_UNLESS_ALL_BUGS_ARE_FATAL macro that
seems to please both GCC and Clang in this case: ordinarily it is a
FALLTHROUGH, but when ALL_BUGS_ARE_FATAL is defined, it's an
abort().

Fixes bug 40241 again.  Bugfix on earlier fix for 40241, which was
merged into maint-0.3.5 and forward, and released in 0.4.5.3-rc.
changes/40241_v2 [new file with mode: 0644]
src/core/or/channeltls.c
src/core/or/circuitlist.c
src/feature/client/entrynodes.c
src/feature/rend/rendclient.c
src/lib/log/util_bug.h