diff --git a/lib/chibi/ast.c b/lib/chibi/ast.c index 8e3cfed5..eed91898 100644 --- a/lib/chibi/ast.c +++ b/lib/chibi/ast.c @@ -409,9 +409,9 @@ static sexp sexp_gc_op (sexp ctx, sexp self, sexp_sint_t n) { } #if SEXP_USE_GREEN_THREADS -static sexp sexp_set_atomic (sexp ctx, sexp self, sexp_sint_t n, sexp new) { +static sexp sexp_set_atomic (sexp ctx, sexp self, sexp_sint_t n, sexp new_val) { sexp res = sexp_global(ctx, SEXP_G_ATOMIC_P); - sexp_global(ctx, SEXP_G_ATOMIC_P) = new; + sexp_global(ctx, SEXP_G_ATOMIC_P) = new_val; return res; } #endif diff --git a/lib/chibi/disasm.c b/lib/chibi/disasm.c index a364266a..bca944a9 100644 --- a/lib/chibi/disasm.c +++ b/lib/chibi/disasm.c @@ -74,7 +74,7 @@ static sexp disasm (sexp ctx, sexp self, sexp bc, sexp out, int depth) { sexp_newline(ctx, out); /* build a table of labels that are jumped to */ - labels = calloc(sexp_bytecode_length(bc), sizeof(sexp_sint_t)); + labels = (sexp_sint_t*)calloc(sexp_bytecode_length(bc), sizeof(sexp_sint_t)); ip = sexp_bytecode_data(bc); while (ip - sexp_bytecode_data(bc) < sexp_bytecode_length(bc)) { switch (*ip++) { diff --git a/lib/srfi/18/threads.c b/lib/srfi/18/threads.c index 2858273e..5e943c02 100644 --- a/lib/srfi/18/threads.c +++ b/lib/srfi/18/threads.c @@ -352,7 +352,7 @@ static sexp sexp_get_signal_handler (sexp ctx, sexp self, sexp_sint_t n, sexp si static sexp sexp_make_pollfds (sexp ctx) { sexp res = sexp_alloc_tagged(ctx, sexp_sizeof_pollfds, sexp_unbox_fixnum(sexp_global(ctx, SEXP_G_THREADS_POLLFDS_ID))); - sexp_pollfds_fds(res) = malloc(SEXP_INIT_POLLFDS_MAX_FDS * sizeof(struct pollfd)); + sexp_pollfds_fds(res) = (struct pollfd*)malloc(SEXP_INIT_POLLFDS_MAX_FDS * sizeof(struct pollfd)); sexp_pollfds_num_fds(res) = 0; sexp_pollfds_max_fds(res) = SEXP_INIT_POLLFDS_MAX_FDS; return res; @@ -385,7 +385,7 @@ static sexp sexp_insert_pollfd (sexp ctx, int fd, int events) { if (sexp_pollfds_num_fds(pollfds) == sexp_pollfds_max_fds(pollfds)) { sexp_pollfds_max_fds(pollfds) = i*2; pfd = sexp_pollfds_fds(pollfds); - sexp_pollfds_fds(pollfds) = malloc(i*2*sizeof(struct pollfd)); + sexp_pollfds_fds(pollfds) = (struct pollfd*)malloc(i*2*sizeof(struct pollfd)); if (sexp_pollfds_fds(pollfds)) memcpy(sexp_pollfds_fds(pollfds), pfd, i*2*sizeof(struct pollfd)); free(pfd);