diff --git a/src/core/fiber.c b/src/core/fiber.c index 84bb8f8c..d4fa5e82 100644 --- a/src/core/fiber.c +++ b/src/core/fiber.c @@ -202,7 +202,7 @@ static void janet_env_detach(JanetFuncEnv *env) { if (env) { size_t s = sizeof(Janet) * env->length; Janet *vmem = malloc(s); - janet_vm_next_collection += s; + janet_vm_next_collection += (uint32_t) s; if (NULL == vmem) { JANET_OUT_OF_MEMORY; } diff --git a/src/core/typedarray.c b/src/core/typedarray.c index dc4ab824..10dc1370 100644 --- a/src/core/typedarray.c +++ b/src/core/typedarray.c @@ -159,7 +159,7 @@ static void ta_view_unmarshal(void *p, JanetMarshalContext *ctx) { view->as.u8 = view->buffer->data + offset; } -static JanetMethod tarray_view_methods[]; +static JanetMethod tarray_view_methods[6]; static Janet ta_getter(void *p, Janet key) { Janet value;