From 7318127dca118119d7e3fcb6dcf6aab34124b413 Mon Sep 17 00:00:00 2001 From: jfreegman Date: Sat, 1 Jan 2022 19:44:11 -0500 Subject: [PATCH] Remove dead code Neither of these clauses can ever be reached. Also attempt to fix travis Windows build --- .travis/cmake-windows.sh | 3 +++ other/bootstrap_daemon/docker/tox-bootstrapd.sha256 | 2 +- toxcore/DHT.c | 8 -------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.travis/cmake-windows.sh b/.travis/cmake-windows.sh index 530db5c2..ee09cd40 100644 --- a/.travis/cmake-windows.sh +++ b/.travis/cmake-windows.sh @@ -25,6 +25,9 @@ travis_script() { # its backtrace. add_flag -gdwarf-2 + # Fix invalid register for .seh_savexmm error + add_flag -fno-asynchronous-unwind-tables + docker run \ -e ALLOW_TEST_FAILURE=true \ -e ENABLE_ARCH_i686="$i686" \ diff --git a/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 b/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 index 49a5f537..e8403060 100644 --- a/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 +++ b/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 @@ -1 +1 @@ -2b75296c24edbefa40809eeef66fa74791e28da407ee9364fb8e516c2ee882aa /usr/local/bin/tox-bootstrapd +7e3bf0d47ff9440c7dd629b721b19846171c08b68762c043d6ce04b1b73ad8e0 /usr/local/bin/tox-bootstrapd diff --git a/toxcore/DHT.c b/toxcore/DHT.c index e1eb2917..f839e576 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c @@ -895,14 +895,6 @@ static int cmp_dht_entry(const void *a, const void *b) return 1; } - if (t1 && !t2) { - return -1; - } - - if (!t1 && t2) { - return 1; - } - const int close = id_closest(cmp_public_key, entry1.public_key, entry2.public_key); if (close == 1) {