stardis

Perform coupled heat transfer calculations
git clone git://git.meso-star.fr/stardis.git
Log | Files | Refs | README | LICENSE

commit 42f0dc82937299c866d335b937e3c0128a2cf5dc
parent 6d1254e894e4d19444435f41feb3fd828e8cf928
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Thu,  5 May 2022 10:56:36 +0200

Fix a warning

Diffstat:
Msrc/stardis-parsing.h | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/stardis-parsing.h b/src/stardis-parsing.h @@ -27,13 +27,21 @@ struct logger; struct stardis; /* Utility macros */ -#define CHK_ARG(Idx, Name) \ +#define CHK_ARG(Idx, Name) {\ if(pwordexp->we_wordc <= (Idx)) {\ logger_print(stardis->logger, LOG_ERROR,\ "Invalid data (missing token '" Name "')\n");\ + arg = "(missing)";\ res = RES_BAD_ARG;\ goto error;\ - } else arg = pwordexp->we_wordv[(Idx)++] + } else {\ + arg = pwordexp->we_wordv[(Idx)++];\ + if(!arg) {\ + arg = "(inconsistant wordexp)";\ + goto error; /* to silent a gcc-11 */\ + }\ + }\ +}(void)0 /* Same ctx used for both media and interface add (some unused parts) */ struct add_geom_ctx {