From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from integral2.. (unknown [125.163.245.210]) by gnuweeb.org (Postfix) with ESMTPSA id 940DF7F67A; Thu, 26 May 2022 11:41:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1653565310; bh=WvQZICNBRUZLZN0Txr+YG8vBUy47nQvMEy17hIUhPE0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c9ouXAqkN68DHbSKPbTNZi0CaFfoC77l9ofc0Vlh0zjD7C3uU0TvlgoY0a0g4qCyW lgQkb897+iod4tNNS4NglaMtaEvAaQ+u24AbARHGtQLRoKg/s8RYIO4COzHPv6cZTX JcZHPBHSSko8OGZwqN/H2XGd8Q5yh90fM7OCQ7zeBB1RSeNlpL8TFaU+sJbbW8I4gg N1Tju/jzL68aihsxLVQZcw/i7cUUwjn1nWFV+1v7Bqi0kUlF7G+9ugFf67srxE0SEd 4u3Wyi2tw7PZ2C1FMR8qpnzL5EdN/of5i5uS0ZZrytlUPfyUgoDny/Zzx8Ju9rOntN mAqQHzbVtJNnw== From: Ammar Faizi To: GNU/Weeb Mailing List Cc: Ammar Faizi , Nick Mathewson Subject: [PATCH tor v1 4/6] compat_libevent: Fix clang-15 complaint (unused variable) Date: Thu, 26 May 2022 18:41:28 +0700 Message-Id: <20220526114130.285353-5-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220526114130.285353-1-ammarfaizi2@gnuweeb.org> References: <20220526114130.285353-1-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: clang-15 throws the following complaint: ``` src/lib/evloop/compat_libevent.c:140:9: error: variable 'attempts' set but not used [-Werror,-Wunused-but-set-variable] int attempts = 0; ^ 1 error generated. ``` This variable firstly introduced in commit 7be50c26e8b2 ("Disable IOCP and retry event_base_new_with_config once on failure"). It's not used. Remove it. Cc: Nick Mathewson Signed-off-by: Ammar Faizi --- src/lib/evloop/compat_libevent.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/evloop/compat_libevent.c b/src/lib/evloop/compat_libevent.c index fd840f8085..c882d3478e 100644 --- a/src/lib/evloop/compat_libevent.c +++ b/src/lib/evloop/compat_libevent.c @@ -137,10 +137,8 @@ tor_libevent_initialize(tor_libevent_cfg_t *torcfg) (void)torcfg; { - int attempts = 0; struct event_config *cfg; - ++attempts; cfg = event_config_new(); tor_assert(cfg); -- Ammar Faizi