aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/analyzer.c10
-rw-r--r--src/codegen.c1
2 files changed, 9 insertions, 2 deletions
diff --git a/src/analyzer.c b/src/analyzer.c
index c7cf3a5..8c8e7ab 100644
--- a/src/analyzer.c
+++ b/src/analyzer.c
@@ -418,12 +418,18 @@ constfoldexpr(struct cfctx ctx, mpq_t *folds, scope_t *scps, type_t *types,
mpf_t x;
double prec = ceil((sv.len - 1) * LOG2_10);
mpf_init2(x, MIN(MP_BITCNT_MAX, (mp_bitcnt_t)prec));
- int ret = mpf_set_str(x, buf, 10);
+#if DEBUG
+ int ret =
+#endif
+ mpf_set_str(x, buf, 10);
assert(ret == 0);
mpq_set_f(folds[i], x);
mpf_clear(x);
} else {
- int ret = mpq_set_str(folds[i], buf, 10);
+#if DEBUG
+ int ret =
+#endif
+ mpq_set_str(folds[i], buf, 10);
assert(ret == 0);
}
return fwdnode(ast, i);
diff --git a/src/codegen.c b/src/codegen.c
index a7c3b2c..4d331e2 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -1,6 +1,7 @@
#include <ctype.h>
#include <stdbool.h>
#include <stdint.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>