--- glpk-5.0/examples/glpsol.c.orig 2022-02-01 16:06:23.078400600 +0100 +++ glpk-5.0/examples/glpsol.c 2022-02-01 17:25:12.031395200 +0100 @@ -955,7 +955,7 @@ #endif { /* stand-alone LP/MIP solver */ struct csa _csa, *csa = &_csa; - int ret; + int ret = EXIT_SUCCESS; #if 0 /* 10/VI-2013 */ glp_long start; #else @@ -1457,7 +1457,7 @@ else if (csa->solution == SOL_INTEGER) { if (!(glp_mip_status(csa->prob) == GLP_OPT || glp_mip_status(csa->prob) == GLP_FEAS)) - ret = -1; + ret = -1; /* !! */ else ret = glp_mpl_postsolve(csa->tran, csa->prob, GLP_MIP); } @@ -1534,7 +1534,6 @@ } /*--------------------------------------------------------------*/ /* all seems to be ok */ - ret = EXIT_SUCCESS; /*--------------------------------------------------------------*/ done: /* delete the LP/MIP problem object */ if (csa->prob != NULL)