From dd1c8f1f721fc139ecb5b96f81caf69894964715 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Tue, 26 Feb 2019 18:48:01 +0100 Subject: [PATCH] MINOR: cfgparse: Add a cast to make gcc happier. When calling calloc(), cast global.nbthread to unsigned int, so that gcc doesn't freak out, as it has no way of knowing global.nbthread can't be negative. --- src/cfgparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cfgparse.c b/src/cfgparse.c index dcbcb48725..4c8b1fea92 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -3596,7 +3596,7 @@ out_uri_auth_compat: LIST_INIT(&toremove_connections[i]); } } - newsrv->idle_orphan_conns = calloc(global.nbthread, sizeof(*newsrv->idle_orphan_conns)); + newsrv->idle_orphan_conns = calloc((unsigned int)global.nbthread, sizeof(*newsrv->idle_orphan_conns)); if (!newsrv->idle_orphan_conns) goto err; for (i = 0; i < global.nbthread; i++) -- 2.39.5