summaryrefslogtreecommitdiffhomepage
path: root/ir/ir
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-02-17 08:09:22 +0100
committerMatthias Braun <matze@braunis.de>2017-02-17 08:10:44 +0100
commit8ee9627da20faba233db911d58e671c0ab5bd143 (patch)
tree5ef83779629a9b36f34056bad5c7e2a4e8281de2 /ir/ir
parentb5248db3ea0839806073ac96a91dc8611853f59d (diff)
Pull side effects out of assert()
Diffstat (limited to 'ir/ir')
-rw-r--r--ir/ir/irio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ir/ir/irio.c b/ir/ir/irio.c
index 55b88b4..469f141 100644
--- a/ir/ir/irio.c
+++ b/ir/ir/irio.c
@@ -2098,7 +2098,9 @@ static void read_modes(read_env_t *env)
switch (kwkind) {
case kw_int_mode: {
const char *name = read_string(env);
- assert(read_mode_arithmetic(env) == irma_twos_complement);
+ ir_mode_arithmetic arith = read_mode_arithmetic(env);
+ assert(arith == irma_twos_complement);
+ (void)arith;
int size = read_long(env);
int sign = read_long(env);
unsigned modulo_shift = read_long(env);
@@ -2107,7 +2109,9 @@ static void read_modes(read_env_t *env)
}
case kw_reference_mode: {
const char *name = read_string(env);
- assert(read_mode_arithmetic(env) == irma_twos_complement);
+ ir_mode_arithmetic arith = read_mode_arithmetic(env);
+ assert(arith == irma_twos_complement);
+ (void)arith;
int size = read_long(env);
unsigned modulo_shift = read_long(env);
ir_mode *mode = new_reference_mode(name, size, modulo_shift);