From 53abc2b1de6a57f126760115139d2907774f9c53 Mon Sep 17 00:00:00 2001 From: Anjan Roy Date: Fri, 14 Jun 2024 21:22:32 +0400 Subject: [PATCH] Explicitly ignore return value of `encaps` function in benchmarks In benchmark we always consider "good" input case. Signed-off-by: Anjan Roy --- benchmarks/bench_kem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmarks/bench_kem.cpp b/benchmarks/bench_kem.cpp index 85e7f47..d3192a4 100644 --- a/benchmarks/bench_kem.cpp +++ b/benchmarks/bench_kem.cpp @@ -101,7 +101,7 @@ bench_encapsulate(benchmark::State& state) const uint64_t start = cpu_ticks(); #endif - kem::encapsulate(_m, _pkey, _cipher, _sender_key); + (void)kem::encapsulate(_m, _pkey, _cipher, _sender_key); benchmark::DoNotOptimize(_m); benchmark::DoNotOptimize(_pkey); @@ -160,7 +160,7 @@ bench_decapsulate(benchmark::State& state) prng.read(_m); - kem::encapsulate(_m, _pkey, _cipher, _sender_key); + (void)kem::encapsulate(_m, _pkey, _cipher, _sender_key); #ifdef __x86_64__ uint64_t total_ticks = 0ul;