aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-01-11 14:37:28 -0500
committerNick Mathewson <nickm@torproject.org>2021-01-11 14:37:28 -0500
commit4b39f46a611ff48ceb7ea212dbcdb2e5b6d26d3b (patch)
tree1b02a2c4b14d2145039a841006d64e95f1c78dd2
parent2e7cbd7a9c4672d334a5900be2d2f4be26e603a3 (diff)
parent6c0f15500b3aa027c90d1c397d4504bb2f4dd41b (diff)
downloadtor-4b39f46a611ff48ceb7ea212dbcdb2e5b6d26d3b.tar.gz
tor-4b39f46a611ff48ceb7ea212dbcdb2e5b6d26d3b.zip
Merge branch 'maint-0.3.5' into maint-0.4.3
-rw-r--r--changes/402414
-rw-r--r--src/core/or/channeltls.c3
-rw-r--r--src/core/or/circuitlist.c2
-rw-r--r--src/feature/client/entrynodes.c2
-rw-r--r--src/feature/rend/rendclient.c2
5 files changed, 12 insertions, 1 deletions
diff --git a/changes/40241 b/changes/40241
new file mode 100644
index 0000000000..c9b2e2c011
--- /dev/null
+++ b/changes/40241
@@ -0,0 +1,4 @@
+ o Minor bugfixes (compilation):
+ - Fix a compilation warning about unreachable fallthrough annotations
+ when building with "--enable-all-bugs-are-fatal" on some compilers.
+ Fixes bug 40241; bugfix on 0.3.5.4-alpha.
diff --git a/src/core/or/channeltls.c b/src/core/or/channeltls.c
index 5f3d038730..1ef9746313 100644
--- a/src/core/or/channeltls.c
+++ b/src/core/or/channeltls.c
@@ -1225,8 +1225,9 @@ channel_tls_handle_var_cell(var_cell_t *var_cell, or_connection_t *conn)
* the v2 and v3 handshakes. */
/* But that should be happening any longer've disabled bufferevents. */
tor_assert_nonfatal_unreached_once();
-
+#ifndef ALL_BUGS_ARE_FATAL
FALLTHROUGH;
+#endif
case OR_CONN_STATE_TLS_SERVER_RENEGOTIATING:
if (!(command_allowed_before_handshake(var_cell->command))) {
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
diff --git a/src/core/or/circuitlist.c b/src/core/or/circuitlist.c
index 96cc718029..b60741245d 100644
--- a/src/core/or/circuitlist.c
+++ b/src/core/or/circuitlist.c
@@ -846,7 +846,9 @@ circuit_purpose_to_controller_hs_state_string(uint8_t purpose)
"Unrecognized circuit purpose: %d",
(int)purpose);
tor_fragile_assert();
+#ifndef ALL_BUGS_ARE_FATAL
FALLTHROUGH;
+#endif
case CIRCUIT_PURPOSE_OR:
case CIRCUIT_PURPOSE_C_GENERAL:
diff --git a/src/feature/client/entrynodes.c b/src/feature/client/entrynodes.c
index 148e6471ba..887af312d3 100644
--- a/src/feature/client/entrynodes.c
+++ b/src/feature/client/entrynodes.c
@@ -2263,7 +2263,9 @@ entry_guards_note_guard_success(guard_selection_t *gs,
break;
default:
tor_assert_nonfatal_unreached();
+#ifndef ALL_BUGS_ARE_FATAL
FALLTHROUGH;
+#endif
case GUARD_CIRC_STATE_USABLE_IF_NO_BETTER_GUARD:
if (guard->is_primary) {
/* XXXX #20832 -- I don't actually like this logic. It seems to make
diff --git a/src/feature/rend/rendclient.c b/src/feature/rend/rendclient.c
index d33b61851f..20b8bacb12 100644
--- a/src/feature/rend/rendclient.c
+++ b/src/feature/rend/rendclient.c
@@ -831,7 +831,9 @@ rend_client_report_intro_point_failure(extend_info_t *failed_intro,
log_warn(LD_BUG, "Unknown failure type %u. Removing intro point.",
failure_type);
tor_fragile_assert();
+#ifndef ALL_BUGS_ARE_FATAL
FALLTHROUGH;
+#endif
case INTRO_POINT_FAILURE_GENERIC:
rend_cache_intro_failure_note(failure_type,
(uint8_t *)failed_intro->identity_digest,