From 83553804b486c026a86c7c4309fb551b7e33758c Mon Sep 17 00:00:00 2001 From: thranur <33481653+thranur@users.noreply.github.com> Date: Mon, 16 Sep 2024 17:00:55 +0200 Subject: [PATCH] fix order of arguments in call to calloc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC 14 reports it as "error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]" and compilation fails otherwise. --- map/sc_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/map/sc_map.c b/map/sc_map.c index 7beb2bd..c81b124 100644 --- a/map/sc_map.c +++ b/map/sc_map.c @@ -108,7 +108,7 @@ v++; \ \ *cap = v; \ - t = sc_map_calloc(sizeof(*t), v + 1); \ + t = sc_map_calloc(v + 1, sizeof(*t)); \ return t ? &t[1] : NULL; \ } \ \