From 4d61ba20ce1dcec42b5595979176f77604b6077f Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 19 May 2024 09:55:39 -0500 Subject: [PATCH] Fix -Werror=calloc-transposed-args --- src/core/compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/compile.c b/src/core/compile.c index 4f45ff1f..93ae2039 100644 --- a/src/core/compile.c +++ b/src/core/compile.c @@ -934,7 +934,7 @@ JanetFuncDef *janetc_pop_funcdef(JanetCompiler *c) { int32_t slotchunks = (def->slotcount + 31) >> 5; /* numchunks is min of slotchunks and scope->ua.count */ int32_t numchunks = slotchunks > scope->ua.count ? scope->ua.count : slotchunks; - uint32_t *chunks = janet_calloc(sizeof(uint32_t), slotchunks); + uint32_t *chunks = janet_calloc(slotchunks, sizeof(uint32_t)); if (NULL == chunks) { JANET_OUT_OF_MEMORY; }