diff options
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/dict_bench.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/benchmark/dict_bench.c b/benchmark/dict_bench.c index 85a4755..bf8a91a 100644 --- a/benchmark/dict_bench.c +++ b/benchmark/dict_bench.c @@ -167,7 +167,11 @@ run(FILE* const fd) char* volatile match = (char*)g_hash_table_lookup(hash, inputs.chunks[index].buf); - assert(!strcmp(match, inputs.chunks[index].buf)); +#ifndef NDEBUG + const char* const m = match; + assert(!strcmp(m, inputs.chunks[index].buf)); +#endif + (void)match; } fprintf(search_dat, "\t%lf", bench_end(&search_start)); @@ -179,8 +183,12 @@ run(FILE* const fd) const ZixChunk* volatile match = (const ZixChunk*)zix_hash_find_record(zhash, &inputs.chunks[index]); - assert(match); - assert(!strcmp(match->buf, inputs.chunks[index].buf)); +#ifndef NDEBUG + const ZixChunk* const m = match; + assert(m); + assert(!strcmp(m->buf, inputs.chunks[index].buf)); +#endif + (void)match; } fprintf(search_dat, "\t%lf\n", bench_end(&search_start)); |