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 592F87F67F; Thu, 26 May 2022 11:41:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1653565312; bh=x+Iy5UlTlTV8tw7tQXnK4zLCD0xVh+MAZrDHoZceVUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kA8cVnDCzzsJ9aivIrDUlXoL4+FxwUqUs8weEJrXtD84x1ukkJpKzgCfuvuRDh7bL QyJHLN+7N8y8Oe7Nd/5WjqGDGiI2KYWSyrwHbi03i2galvIWilciiEfGv9TI8OzZKI 5xogh9DWYwyjO4liIWBkj8tDg56/0iy/TEYSyI1jSeek3GoFKRtrd/2k1o8hajI5gM loY1ICeLuWN4/Cnjt3WD1DR/ffRwQy3bvhW84YxPFa1whWo8yXYCuT1Gd9nCUUIc/k xj7ZbyxcvcWDN1uR4mE0GO/efHA0miKT8yWa7bE4FSQpAxBYzRvorMG/Yfs3++bDuK pw34X6phb6DKg== From: Ammar Faizi To: GNU/Weeb Mailing List Cc: Ammar Faizi , Nick Mathewson Subject: [PATCH tor v1 5/6] test/bench: Fix clang-15 complaint (unused variable) Date: Thu, 26 May 2022 18:41:29 +0700 Message-Id: <20220526114130.285353-6-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/test/bench.c:380:14: error: variable 't' set but not used [-Werror,-Wunused-but-set-variable] uint32_t t=0; ^ 1 error generated. ``` This variable firstly introduced in commit 490e187056d8 ("Add a benchmark for our several PRNGs."). Suppress the complaint by casting it to `(void)`. Cc: Nick Mathewson Signed-off-by: Ammar Faizi --- src/test/bench.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/bench.c b/src/test/bench.c index a76ea67eb8..8a4a998e8d 100644 --- a/src/test/bench.c +++ b/src/test/bench.c @@ -381,6 +381,7 @@ bench_rand_len(int len) for (i = 0; i < N; ++i) { t += tor_weak_random(&weak); } + (void)t; end = perftime(); printf("weak_rand(4): %f nsec.\n", NANOCOUNT(start,end,N)); } -- Ammar Faizi