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 CFF487F675; Thu, 26 May 2022 11:41:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1653565309; bh=vA6ao/vy2BdaAqYKau004JSx9nPmBoqutkW8pz1rzVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iYvG4uBvcQn8GnowqPeZF8x5qmYp8/G8zccXkZqy6EEGYprsdAoCPC32Vr6f4QdoO FPi8j+njCmB+BA6PdK9Y2Qyu+OD/uYR1pIyLGoyKDDZ/Vex4yBIZUHgDU65sW2oLtz DWsx63BFBxSI0KAIor+z0xqMw7QwBbIuOkFx1TMmvZ+lXaBMwKRgg47yH0pAsbnua3 z1dMuMZYVTvr5Xk6dyszGX8tLsnYPCypWx4LUFMbflRJAXZO/0/W+9wzVkqYtEd5jr ZzHV1WcSbgKWv4AuljGD9xTZN0iWY2wFHYKoFZk/0agSQmY4MMaw7nzzfriUs2feum eawJ+KSQKXhhQ== From: Ammar Faizi To: GNU/Weeb Mailing List Cc: Ammar Faizi , Nick Mathewson Subject: [PATCH tor v1 3/6] routerlist: Fix clang-15 complaint (unused variable) Date: Thu, 26 May 2022 18:41:27 +0700 Message-Id: <20220526114130.285353-4-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/feature/nodelist/routerlist.c:246:7: error: variable 'nocache' set but not used [-Werror,-Wunused-but-set-variable] int nocache=0; ^ 1 error generated. ``` This variable firstly introduced in commit 3ad6dc0e2e91 ("r15806@catbus: nickm | 2007-10-15 19:14:57 -0400"). Remove it. Cc: Nick Mathewson Signed-off-by: Ammar Faizi --- src/feature/nodelist/routerlist.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/feature/nodelist/routerlist.c b/src/feature/nodelist/routerlist.c index 8bcc42bc3f..2df282733c 100644 --- a/src/feature/nodelist/routerlist.c +++ b/src/feature/nodelist/routerlist.c @@ -243,7 +243,6 @@ router_rebuild_store(int flags, desc_store_t *store) int r = -1; off_t offset = 0; smartlist_t *signed_descriptors = NULL; - int nocache=0; size_t total_expected_len = 0; int had_any; int force = flags & RRS_FORCE; @@ -304,7 +303,6 @@ router_rebuild_store(int flags, desc_store_t *store) goto done; } if (sd->do_not_cache) { - ++nocache; continue; } c = tor_malloc(sizeof(sized_chunk_t)); -- Ammar Faizi