Loading configure.ac +16 −0 Original line number Diff line number Diff line Loading @@ -434,6 +434,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]), Loading src/core/proto/proto_socks.c +4 −1 Original line number Diff line number Diff line Loading @@ -1071,7 +1071,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 " Loading src/ext/ed25519/donna/ed25519_tor.c +3 −1 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -366,4 +369,3 @@ ed25519_donna_scalarmult_with_group_order(unsigned char *out, } #include "test-internals.c" src/feature/dirauth/keypin.c +1 −1 Original line number Diff line number Diff line Loading @@ -265,7 +265,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); Loading src/feature/relay/dns.c +1 −1 Original line number Diff line number Diff line Loading @@ -530,7 +530,7 @@ 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. */ case RESOLVED_TYPE_ERROR_TRANSIENT: Loading Loading
configure.ac +16 −0 Original line number Diff line number Diff line Loading @@ -434,6 +434,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]), Loading
src/core/proto/proto_socks.c +4 −1 Original line number Diff line number Diff line Loading @@ -1071,7 +1071,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 " Loading
src/ext/ed25519/donna/ed25519_tor.c +3 −1 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -366,4 +369,3 @@ ed25519_donna_scalarmult_with_group_order(unsigned char *out, } #include "test-internals.c"
src/feature/dirauth/keypin.c +1 −1 Original line number Diff line number Diff line Loading @@ -265,7 +265,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); Loading
src/feature/relay/dns.c +1 −1 Original line number Diff line number Diff line Loading @@ -530,7 +530,7 @@ 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. */ case RESOLVED_TYPE_ERROR_TRANSIENT: Loading