From: Mark Wooding Date: Thu, 13 May 2021 13:48:39 +0000 (+0100) Subject: lib.c (config_set_var_n): Return a pointer even if we don't change the var. X-Git-Url: https://git.distorted.org.uk/~mdw/runlisp/commitdiff_plain/6445760568e196c3239cdd08ec5432f96628f4cf lib.c (config_set_var_n): Return a pointer even if we don't change the var. Spotted by old GCC; not sure why newer versions are silent here. --- diff --git a/lib.c b/lib.c index 4f93285..edb6e33 100644 --- a/lib.c +++ b/lib.c @@ -1089,7 +1089,7 @@ struct config_var *config_set_var_n(struct config *conf, struct config_var *var = config_find_var_n(conf, sect, CF_CREAT, name, namelen); - if (var->f&~f&CF_OVERRIDE) return; + if (var->f&~f&CF_OVERRIDE) return (var); free(var->val); var->val = xstrndup(value, valuelen); var->n = valuelen; var->f = f; return (var);