From 2ffdb74fb1b12e9f3730d0f152b795838934547d Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 17 Jun 2020 19:30:53 +0000 Subject: Use (and ignore) the expression provided to log_assert in NDEBUG builds. This avoids warnings in NDEBUG builds emitted when a variable is only used in log_assert, but is always defined. --- kernel/macc.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'kernel/macc.h') diff --git a/kernel/macc.h b/kernel/macc.h index e9f6f05e9..d216e6772 100644 --- a/kernel/macc.h +++ b/kernel/macc.h @@ -107,10 +107,8 @@ struct Macc std::vector config_bits = cell->getParam(ID::CONFIG).bits; int config_cursor = 0; -#ifndef NDEBUG int config_width = cell->getParam(ID::CONFIG_WIDTH).as_int(); log_assert(GetSize(config_bits) >= config_width); -#endif int num_bits = 0; if (config_bits[config_cursor++] == State::S1) num_bits |= 1; -- cgit v1.2.3