aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Howard <gavin@yzena.com>2021-08-08 22:02:15 -0600
committerGavin Howard <gavin@yzena.com>2021-08-08 22:02:15 -0600
commit3635261ef91fc4c76eb6157af064cda02cd38c44 (patch)
treeece67382e8acc850b8be3d9804c3fbf975405953
parentbaf2715f552c919361541e199f934674722076ba (diff)
downloadbc-3635261ef91fc4c76eb6157af064cda02cd38c44.tar.gz
Do one last tweak to prevent compiler warnings
Signed-off-by: Gavin Howard <gavin@yzena.com>
-rw-r--r--src/program.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/program.c b/src/program.c
index c943db82..1ba012e5 100644
--- a/src/program.c
+++ b/src/program.c
@@ -2627,9 +2627,11 @@ void bc_program_exec(BcProgram *p) {
#if BC_ENABLED
BcNum *num;
#endif // BC_ENABLED
+#if !BC_HAS_COMPUTED_GOTO
#ifndef NDEBUG
size_t jmp_bufs_len;
#endif // NDEBUG
+#endif // !BC_HAS_COMPUTED_GOTO
#if BC_HAS_COMPUTED_GOTO
BC_PROG_LBLS;
@@ -3165,15 +3167,17 @@ void bc_program_exec(BcProgram *p) {
abort();
#endif // NDEBUG
}
-#endif // !C_HAS_COMPUTED_GOTO
+#endif // BC_HAS_COMPUTED_GOTO
}
+#if !BC_HAS_COMPUTED_GOTO
#ifndef NDEBUG
// This is to allow me to use a debugger to see the last instruction,
// which will point to which function was the problem. But it's also a
// good smoke test for error handling changes.
assert(jmp_bufs_len == vm.jmp_bufs.len);
#endif // NDEBUG
+#endif // !BC_HAS_COMPUTED_GOTO
}
}