Deal with errors generated when RELEASE build made
This commit is contained in:
2
Makefile
2
Makefile
@@ -13,7 +13,7 @@ DEPFLAGS=-MT $@ -MMD -MP -MF
|
||||
ifeq ($(RELEASE), 1)
|
||||
CFLAGS=$(GFLAGS) $(RFLAGS) -DDEBUG=0
|
||||
else
|
||||
CFLAGS=$(GFLAGS) $(DFLAGS)
|
||||
CFLAGS=$(GFLAGS) $(DFLAGS) -DDEBUG=2
|
||||
endif
|
||||
|
||||
DIST=build
|
||||
|
||||
4
base.h
4
base.h
@@ -45,7 +45,7 @@ static_assert(sizeof(f64) == sizeof(u64));
|
||||
#define TODO(MSG) (assert(false && MSG));
|
||||
|
||||
#ifndef DEBUG
|
||||
#define DEBUG 2
|
||||
#define DEBUG 0
|
||||
#endif
|
||||
|
||||
static inline void debug(char *fmt, ...)
|
||||
@@ -55,6 +55,8 @@ static inline void debug(char *fmt, ...)
|
||||
va_start(ap, fmt);
|
||||
vprintf(fmt, ap);
|
||||
va_end(ap);
|
||||
#else
|
||||
(void)fmt;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -88,5 +88,7 @@ void context_report(context_t *context)
|
||||
info("<Context>: %luB/%luB main memory used\n", mem_used, mem_cap);
|
||||
info("<Context>: %luB/%luB read space used\n", read_used, read_cap);
|
||||
info("<Context>: %luB/%luB scratch space used\n", scr_used, scr_cap);
|
||||
#else
|
||||
(void)context;
|
||||
#endif
|
||||
}
|
||||
|
||||
5
main.c
5
main.c
@@ -88,10 +88,9 @@ int main(int argc, char *argv[])
|
||||
u64 size = results.size / sizeof(*lisps);
|
||||
for (u64 i = 0; i < size; ++i)
|
||||
{
|
||||
lisp_t *lisp = lisps[i];
|
||||
// printf("tag=%x\n", tag_get(lisp));
|
||||
lisp_t *lisp = lisps[i];
|
||||
sv_t serialised = serialise(&ctx, lisp);
|
||||
info("lisp[%lu]: %p => " PR_SV "\n", i, lisp, SV_FMT(serialised));
|
||||
debug("lisp[%lu]: %p => " PR_SV "\n", i, lisp, SV_FMT(serialised));
|
||||
}
|
||||
context_report(&ctx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user