Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug34078 035 #1882

Open
wants to merge 7 commits into
base: maint-0.3.5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,22 @@ if test "$tor_cv_c_c99_designated_init" != "yes"; then
AC_MSG_ERROR([Your compiler doesn't support c99 designated initializers. This is required as of Tor 0.2.6.x])
fi

saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
AC_CACHE_CHECK([for __attribute__((fallthrough))],
tor_cv_c_attr_fallthrough,
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([extern int x; void fn(void) ;],
[[ switch (x) { case 1: fn(); __attribute__((fallthrough));
case 2: fn(); break; } ]])],
[tor_cv_c_attr_fallthrough=yes],
[tor_cv_c_attr_fallthrough=no] )])
CFLAGS="$saved_CFLAGS"

if test "$tor_cv_c_attr_fallthrough" == "yes"; then
AC_DEFINE(HAVE_ATTR_FALLTHROUGH, [1], [defined if we have the fallthrough attribute.])
fi

TORUSER=_tor
AC_ARG_WITH(tor-user,
AS_HELP_STRING(--with-tor-user=NAME, [specify username for tor daemon]),
Expand Down
8 changes: 4 additions & 4 deletions src/app/config/confparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ config_assign_value(const config_format_t *fmt, void *options,
*(int *)lvalue = CFG_AUTO_PORT;
break;
}
/* fall through */
FALLTHROUGH;
case CONFIG_TYPE_INT:
case CONFIG_TYPE_UINT:
i = (int)tor_parse_long(c->value, 10,
Expand Down Expand Up @@ -577,7 +577,7 @@ config_get_assigned_option(const config_format_t *fmt, const void *options,
escape_val = 0;
break;
}
/* fall through */
FALLTHROUGH;
case CONFIG_TYPE_CSV_INTERVAL:
case CONFIG_TYPE_INTERVAL:
case CONFIG_TYPE_MSEC_INTERVAL:
Expand All @@ -588,7 +588,7 @@ config_get_assigned_option(const config_format_t *fmt, const void *options,
tor_asprintf(&result->value, "%d", *(int*)value);
escape_val = 0; /* Can't need escape. */
break;
case CONFIG_TYPE_UINT64: /* Fall through */
case CONFIG_TYPE_UINT64: FALLTHROUGH;
case CONFIG_TYPE_MEMUNIT:
tor_asprintf(&result->value, "%"PRIu64,
(*(uint64_t*)value));
Expand All @@ -605,7 +605,7 @@ config_get_assigned_option(const config_format_t *fmt, const void *options,
escape_val = 0;
break;
}
/* fall through */
FALLTHROUGH;
case CONFIG_TYPE_BOOL:
result->value = tor_strdup(*(int*)value ? "1" : "0");
escape_val = 0; /* Can't need escape. */
Expand Down
2 changes: 1 addition & 1 deletion src/core/or/channeltls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ channel_tls_handle_var_cell(var_cell_t *var_cell, or_connection_t *conn)
/* But that should be happening any longer've disabled bufferevents. */
tor_assert_nonfatal_unreached_once();

/* fall through */
FALLTHROUGH;
case OR_CONN_STATE_TLS_SERVER_RENEGOTIATING:
if (!(command_allowed_before_handshake(var_cell->command))) {
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
Expand Down
2 changes: 1 addition & 1 deletion src/core/or/circuitbuild.c
Original file line number Diff line number Diff line change
Expand Up @@ -2106,7 +2106,7 @@ choose_good_exit_server(origin_circuit_t *circ,
/* For these three, we want to pick the exit like a middle hop,
* since it should be random. */
tor_assert_nonfatal(is_internal);
/* Falls through */
FALLTHROUGH;
case CIRCUIT_PURPOSE_C_GENERAL:
if (is_internal) /* pick it like a middle hop */
return router_choose_random_node(NULL, options->ExcludeNodes, flags);
Expand Down
4 changes: 2 additions & 2 deletions src/core/or/circuitlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ circuit_purpose_to_controller_hs_state_string(uint8_t purpose)
"Unrecognized circuit purpose: %d",
(int)purpose);
tor_fragile_assert();
/* fall through */
FALLTHROUGH;

case CIRCUIT_PURPOSE_OR:
case CIRCUIT_PURPOSE_C_GENERAL:
Expand Down Expand Up @@ -2738,7 +2738,7 @@ assert_cpath_layer_ok(const crypt_path_t *cp)
{
case CPATH_STATE_OPEN:
relay_crypto_assert_ok(&cp->crypto);
/* fall through */
FALLTHROUGH;
case CPATH_STATE_CLOSED:
/*XXXX Assert that there's no handshake_state either. */
tor_assert(!cp->rend_dh_handshake_state);
Expand Down
2 changes: 1 addition & 1 deletion src/core/or/circuituse.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ circuit_expire_building(void)
TO_ORIGIN_CIRCUIT(victim)->build_state->pending_final_cpath ==
NULL)
break;
/* fallthrough! */
FALLTHROUGH;
case CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT:
case CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED:
/* If we have reached this line, we want to spare the circ for now. */
Expand Down
2 changes: 1 addition & 1 deletion src/core/or/connection_edge.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ connection_edge_process_inbuf(edge_connection_t *conn, int package_partial)
}
/* Fall through if the connection is on a circuit without optimistic
* data support. */
/* Falls through. */
FALLTHROUGH;
case EXIT_CONN_STATE_CONNECTING:
case AP_CONN_STATE_RENDDESC_WAIT:
case AP_CONN_STATE_CIRCUIT_WAIT:
Expand Down
2 changes: 1 addition & 1 deletion src/core/or/onion.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ create_cell_format_impl(cell_t *cell_out, const create_cell_t *cell_in,
p += 16;
space -= 16;
}
/* Fall through */
FALLTHROUGH;
case CELL_CREATE_FAST:
tor_assert(cell_in->handshake_len <= space);
memcpy(p, cell_in->onionskin, cell_in->handshake_len);
Expand Down
2 changes: 1 addition & 1 deletion src/core/or/reasons.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ end_reason_to_http_connect_response_line(int endreason)
return "HTTP/1.0 502 Bad Gateway (tor protocol violation)\r\n\r\n";
case END_STREAM_REASON_ENTRYPOLICY:
return "HTTP/1.0 403 Forbidden (entry policy violation)\r\n\r\n";
case END_STREAM_REASON_NOTDIRECTORY: /* Fall Through */
case END_STREAM_REASON_NOTDIRECTORY: FALLTHROUGH;
default:
tor_assert_nonfatal_unreached();
return "HTTP/1.0 500 Internal Server Error (weird end reason)\r\n\r\n";
Expand Down
2 changes: 1 addition & 1 deletion src/core/or/relay.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ connection_ap_process_end_not_open(
break; /* break means it'll close, below */
/* Else fall through: expire this circuit, clear the
* chosen_exit_name field, and try again. */
/* Falls through. */
FALLTHROUGH;
case END_STREAM_REASON_RESOLVEFAILED:
case END_STREAM_REASON_TIMEOUT:
case END_STREAM_REASON_MISC:
Expand Down
4 changes: 2 additions & 2 deletions src/core/or/scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ get_scheduler_type_string(scheduler_types_t type)
case SCHEDULER_KIST_LITE:
return "KISTLite";
case SCHEDULER_NONE:
/* fallthrough */
FALLTHROUGH;
default:
tor_assert_unreached();
return "(N/A)";
Expand Down Expand Up @@ -288,7 +288,7 @@ select_scheduler(void)
scheduler_kist_set_lite_mode();
goto end;
case SCHEDULER_NONE:
/* fallthrough */
FALLTHROUGH;
default:
/* Our option validation should have caught this. */
tor_assert_unreached();
Expand Down
9 changes: 6 additions & 3 deletions src/core/proto/proto_socks.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ fetch_from_buf_socks(buf_t *buf, socks_request_t *req,
case SOCKS_RESULT_TRUNCATED:
if (datalen == n_pullup)
return 0;
/* FALLTHRU */
FALLTHROUGH;
case SOCKS_RESULT_MORE_EXPECTED:
res = 0;
break;
Expand Down Expand Up @@ -962,7 +962,7 @@ parse_socks(const char *data, size_t datalen, socks_request_t *req,
strlcpy((char*)req->reply, SOCKS_PROXY_IS_NOT_AN_HTTP_PROXY_MSG,
MAX_SOCKS_REPLY_LEN);
req->replylen = strlen((char*)req->reply)+1;
/* fall through */
FALLTHROUGH;
default: /* version is not socks4 or socks5 */
log_warn(LD_APP,
"Socks version %d not recognized. (This port is not an "
Expand Down Expand Up @@ -1067,7 +1067,10 @@ parse_socks_client(const uint8_t *data, size_t datalen,
log_info(LD_NET, "SOCKS 5 client: need authentication.");
*drain_out = -1;
return 2;
/* fall through */
default:
/* This wasn't supposed to be exhaustive; there are other
* authentication methods too. */
;
}

*reason = tor_strdup("server doesn't support any of our available "
Expand Down
14 changes: 7 additions & 7 deletions src/ext/csiphash.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ uint64_t siphash24(const void *src, unsigned long src_sz, const struct sipkey *k
}

switch (src_sz - blocks) {
case 7: last7 |= (uint64_t)m[i + 6] << 48; /* Falls through. */
case 6: last7 |= (uint64_t)m[i + 5] << 40; /* Falls through. */
case 5: last7 |= (uint64_t)m[i + 4] << 32; /* Falls through. */
case 4: last7 |= (uint64_t)m[i + 3] << 24; /* Falls through. */
case 3: last7 |= (uint64_t)m[i + 2] << 16; /* Falls through. */
case 2: last7 |= (uint64_t)m[i + 1] << 8; /* Falls through. */
case 1: last7 |= (uint64_t)m[i + 0] ; /* Falls through. */
case 7: last7 |= (uint64_t)m[i + 6] << 48; FALLTHROUGH;
case 6: last7 |= (uint64_t)m[i + 5] << 40; FALLTHROUGH;
case 5: last7 |= (uint64_t)m[i + 4] << 32; FALLTHROUGH;
case 4: last7 |= (uint64_t)m[i + 3] << 24; FALLTHROUGH;
case 3: last7 |= (uint64_t)m[i + 2] << 16; FALLTHROUGH;
case 2: last7 |= (uint64_t)m[i + 1] << 8; FALLTHROUGH;
case 1: last7 |= (uint64_t)m[i + 0] ; FALLTHROUGH;
case 0:
default:;
}
Expand Down
4 changes: 3 additions & 1 deletion src/ext/ed25519/donna/ed25519_tor.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
#define ED25519_FN(fn) ED25519_FN2(fn,ED25519_SUFFIX)

#include "orconfig.h"

#include "lib/cc/compat_compiler.h"

#include "ed25519-donna.h"
#include "ed25519_donna_tor.h"
#include "ed25519-randombytes.h"
Expand Down Expand Up @@ -366,4 +369,3 @@ ed25519_donna_scalarmult_with_group_order(unsigned char *out,
}

#include "test-internals.c"

48 changes: 24 additions & 24 deletions src/ext/ed25519/donna/modm-donna-32bit.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,14 +385,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; /* Falls through. */
case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); out[i] &= 0x3fffffff; i++; FALLTHROUGH;
case 0:
default: out[i] = (a[i] - b[i]) - carry;
}
Expand All @@ -403,14 +403,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm a, const bignum256modm
static int
lt256_modm_batch(const bignum256modm a, const bignum256modm b, size_t limbsize) {
switch (limbsize) {
case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1; /* Falls through. */
case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1; /* Falls through. */
case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1; /* Falls through. */
case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1; /* Falls through. */
case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1; /* Falls through. */
case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1; /* Falls through. */
case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1; /* Falls through. */
case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1; /* Falls through. */
case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1; FALLTHROUGH;
case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1; FALLTHROUGH;
case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1; FALLTHROUGH;
case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1; FALLTHROUGH;
case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1; FALLTHROUGH;
case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1; FALLTHROUGH;
case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1; FALLTHROUGH;
case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1; FALLTHROUGH;
case 0: if (a[0] > b[0]) return 0; if (a[0] < b[0]) return 1;
}
return 0;
Expand All @@ -420,14 +420,14 @@ lt256_modm_batch(const bignum256modm a, const bignum256modm b, size_t limbsize)
static int
lte256_modm_batch(const bignum256modm a, const bignum256modm b, size_t limbsize) {
switch (limbsize) {
case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1; /* Falls through. */
case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1; /* Falls through. */
case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1; /* Falls through. */
case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1; /* Falls through. */
case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1; /* Falls through. */
case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1; /* Falls through. */
case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1; /* Falls through. */
case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1; /* Falls through. */
case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1; FALLTHROUGH;
case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1; FALLTHROUGH;
case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1; FALLTHROUGH;
case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1; FALLTHROUGH;
case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1; FALLTHROUGH;
case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1; FALLTHROUGH;
case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1; FALLTHROUGH;
case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1; FALLTHROUGH;
case 0: if (a[0] > b[0]) return 0; if (a[0] < b[0]) return 1;
}
return 1;
Expand Down
24 changes: 12 additions & 12 deletions src/ext/ed25519/donna/modm-donna-64bit.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,10 @@ sub256_modm_batch(bignum256modm out, const bignum256modm a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
case 4: out[i] = (a[i] - b[i]) ; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; /* Falls through. */
case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; /* Falls through. */
case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; /* Falls through. */
case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; /* Falls through. */
case 4: out[i] = (a[i] - b[i]) ; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; FALLTHROUGH;
case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; FALLTHROUGH;
case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; FALLTHROUGH;
case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); out[i] &= 0xffffffffffffff; i++; FALLTHROUGH;
case 0:
default: out[i] = (a[i] - b[i]) - carry;
}
Expand All @@ -310,10 +310,10 @@ lt256_modm_batch(const bignum256modm a, const bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
case 4: t = (a[i] - b[i]) ; carry = (t >> 63); i++; /* Falls through. */
case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* Falls through. */
case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* Falls through. */
case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* Falls through. */
case 4: t = (a[i] - b[i]) ; carry = (t >> 63); i++; FALLTHROUGH;
case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; FALLTHROUGH;
case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; FALLTHROUGH;
case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; FALLTHROUGH;
case 0: t = (a[i] - b[i]) - carry; carry = (t >> 63);
}
return (int)carry;
Expand All @@ -325,10 +325,10 @@ lte256_modm_batch(const bignum256modm a, const bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
case 4: t = (b[i] - a[i]) ; carry = (t >> 63); i++; /* Falls through. */
case 3: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++; /* Falls through. */
case 2: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++; /* Falls through. */
case 1: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++; /* Falls through. */
case 4: t = (b[i] - a[i]) ; carry = (t >> 63); i++; FALLTHROUGH;
case 3: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++; FALLTHROUGH;
case 2: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++; FALLTHROUGH;
case 1: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++; FALLTHROUGH;
case 0: t = (b[i] - a[i]) - carry; carry = (t >> 63);
}
return (int)!carry;
Expand Down
2 changes: 1 addition & 1 deletion src/feature/client/entrynodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2263,7 +2263,7 @@ entry_guards_note_guard_success(guard_selection_t *gs,
break;
default:
tor_assert_nonfatal_unreached();
/* Fall through. */
FALLTHROUGH;
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
Expand Down
2 changes: 1 addition & 1 deletion src/feature/control/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -4934,7 +4934,7 @@ handle_control_add_onion(control_connection_t *conn,
case RSAE_BADAUTH:
connection_printf_to_buf(conn, "512 Invalid client authorization\r\n");
break;
case RSAE_INTERNAL: /* FALLSTHROUGH */
case RSAE_INTERNAL: FALLTHROUGH;
default:
connection_printf_to_buf(conn, "551 Failed to add Onion Service\r\n");
}
Expand Down
2 changes: 1 addition & 1 deletion src/feature/dirauth/keypin.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ keypin_add_or_replace_entry_in_map(keypin_ent_t *ent)
}
tor_free(ent2);
r = -1;
/* Fall through */
/* Note lack of return here: we fall through to the next line. */
}

keypin_add_entry_to_map(ent);
Expand Down
2 changes: 1 addition & 1 deletion src/feature/dirclient/dirclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ directory_initiate_request,(directory_request_t *request))
case 1:
/* start flushing conn */
conn->base_.state = DIR_CONN_STATE_CLIENT_SENDING;
/* fall through */
FALLTHROUGH;
case 0:
/* queue the command on the outbuf */
directory_send_command(conn, 1, request);
Expand Down
2 changes: 1 addition & 1 deletion src/feature/dirparse/parsecommon.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ token_check_object(memarea_t *area, const char *kwd,
kwd, crypto_pk_num_bits(tok->key));
RET_ERR(ebuf);
}
/* fall through */
FALLTHROUGH;
case NEED_KEY: /* There must be some kind of key. */
if (!tok->key) {
tor_snprintf(ebuf, sizeof(ebuf), "Missing public key for %s", kwd);
Expand Down
4 changes: 2 additions & 2 deletions src/feature/relay/dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,9 @@ send_resolved_cell,(edge_connection_t *conn, uint8_t answer_type,
break;
} else {
answer_type = RESOLVED_TYPE_ERROR;
/* fall through. */
/* We let this fall through and treat it as an error. */
}
/* Falls through. */
FALLTHROUGH;
case RESOLVED_TYPE_ERROR_TRANSIENT:
case RESOLVED_TYPE_ERROR:
{
Expand Down
Loading