From af9107aff2a76d390426079b2d267269e7215027 Mon Sep 17 00:00:00 2001 From: Alexander Færøy Date: Fri, 5 Feb 2021 17:12:52 +0000 Subject: Fix Windows build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While trying to resolve our CI issues, the Windows build broke with an unused function error: src/test/test_switch_id.c:37:1: error: ‘unprivileged_port_range_start’ defined but not used [-Werror=unused-function] We solve this by moving the `#if !defined(_WIN32)` test above the `unprivileged_port_range_start()` function defintion such that it is included in its body. This is an unreviewed commit. See: tor#40275 --- src/test/test_switch_id.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/test_switch_id.c b/src/test/test_switch_id.c index a911269c99..f97af55d17 100644 --- a/src/test/test_switch_id.c +++ b/src/test/test_switch_id.c @@ -31,6 +31,8 @@ static const struct { { NULL, 0 } }; +#if !defined(_WIN32) + /* Returns the first port that we think we can bind to without special * permissions. Usually this function returns 1024. */ static uint16_t @@ -67,8 +69,6 @@ unprivileged_port_range_start(void) return result; } -#if !defined(_WIN32) - #define PORT_TEST_RANGE_START 600 #define PORT_TEST_RANGE_END 1024 -- cgit v1.2.3-54-g00ecf From 62b98716ff4823cff6f8e70c262766d1f25f252f Mon Sep 17 00:00:00 2001 From: Alexander Færøy Date: Fri, 5 Feb 2021 17:16:05 +0000 Subject: Fix CI build: practracker error in connection_edge.c. We solve this error by allowing the connection_exit_connect() function to be 130 lines long. Unreviewed build fix commit. See: tor#40275. --- scripts/maint/practracker/exceptions.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/maint/practracker/exceptions.txt b/scripts/maint/practracker/exceptions.txt index 35e860d8b1..a84a434cd6 100644 --- a/scripts/maint/practracker/exceptions.txt +++ b/scripts/maint/practracker/exceptions.txt @@ -130,6 +130,7 @@ problem function-size /src/core/or/command.c:command_process_create_cell() 156 problem function-size /src/core/or/command.c:command_process_relay_cell() 132 problem dependency-violation /src/core/or/command.c 9 problem file-size /src/core/or/connection_edge.c 4655 +problem function-size /src/core/or/connection_edge.c:connection_exit_connect() 130 problem include-count /src/core/or/connection_edge.c 65 problem function-size /src/core/or/connection_edge.c:connection_ap_expire_beginning() 117 problem function-size /src/core/or/connection_edge.c:connection_ap_handshake_rewrite() 193 -- cgit v1.2.3-54-g00ecf