Explicitly ignore return value of encaps function in benchmarks

In benchmark we always consider "good" input case.

Signed-off-by: Anjan Roy <hello@itzmeanjan.in>
This commit is contained in:
Anjan Roy
2024-06-14 21:22:32 +04:00
parent d750b3cc83
commit 53abc2b1de

View File

@@ -101,7 +101,7 @@ bench_encapsulate(benchmark::State& state)
const uint64_t start = cpu_ticks();
#endif
kem::encapsulate<k, eta1, eta2, du, dv>(_m, _pkey, _cipher, _sender_key);
(void)kem::encapsulate<k, eta1, eta2, du, dv>(_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<k, eta1, eta2, du, dv>(_m, _pkey, _cipher, _sender_key);
(void)kem::encapsulate<k, eta1, eta2, du, dv>(_m, _pkey, _cipher, _sender_key);
#ifdef __x86_64__
uint64_t total_ticks = 0ul;