summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-01-20 23:51:50 -0800
committerKaz Kylheku <kaz@kylheku.com>2023-01-20 23:51:50 -0800
commit366a7fba840293f54ae49108f4bc5d3d94c848c4 (patch)
treefcb82613411d437840bebbb08b9de778d562d234 /lib.h
parentc6d7e940e105958e4303eba504cf147b7f428cdf (diff)
downloadtxr-366a7fba840293f54ae49108f4bc5d3d94c848c4.tar.gz
txr-366a7fba840293f54ae49108f4bc5d3d94c848c4.tar.bz2
txr-366a7fba840293f54ae49108f4bc5d3d94c848c4.zip
fix --no-gen-gc configuration.
This fixes only the build. I'm getting a crash in one test case, namely tests/010/json.tl. * lib.h (mut): Remove stray semicolon from definition. This semicolon compensates for the lack of a semicolon in txr.c, which becomes a syntax errror under no-gen-gc, when the other definition of mut is active. (mkloc, setcheck): Let's add casts of the object argument to void. This gets rid of a number of unused parameter errors in various functions that take an object parameter that is only used in the case of generational GC. * txr.c (txr_main): Add missing semicolon after mut call. * gc.c (gc_wrap): In the no CONFIG_GEN_GC case, cast argument full to void, since it is unused.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib.h b/lib.h
index 8aa23a3f..f3cd8429 100644
--- a/lib.h
+++ b/lib.h
@@ -411,18 +411,18 @@ INLINE loc mkloc_fun(val *ptr, val obj)
#define valptr(lo) ((lo).ptr)
#define set(lo, val) (gc_set(lo, val))
#define setcheck(tgt, src) (gc_assign_check(tgt, src))
-#define mut(obj) (gc_mutated(obj));
+#define mut(obj) (gc_mutated(obj))
#define mpush(val, lo) (gc_push(val, lo))
#else
typedef val *loc;
-#define mkloc(expr, obj) (&(expr))
+#define mkloc(expr, obj) ((void) (obj), &(expr))
#define mkcloc(expr) (&(expr))
#define nulloc ((loc) 0)
#define nullocp(lo) (!(lo))
#define deref(lo) (*(lo))
#define valptr(lo) (lo)
#define set(lo, val) (*(lo) = (val))
-#define setcheck(tgt, src) ((void) 0)
+#define setcheck(tgt, src) ((void) (tgt))
#define mut(obj) ((void) (obj))
#define mpush(val, lo) (push(val, lo))
#endif