# HG changeset patch # User John W. Eaton # Date 1629428256 14400 # Node ID 09d97b7bc90474d7f5aabac10aac2ea26fa16b4d # Parent 26bb2cbf6da2ac63c41a07221aded2ce1f222d4d avoid possible uninitialized variable warnings * __glpk__.cc (glpk): Initialize time. (F__glpk__): Initialize time and status before call to glpk. diff -r 26bb2cbf6da2 -r 09d97b7bc904 libinterp/dldfcn/__glpk__.cc --- a/libinterp/dldfcn/__glpk__.cc Thu Aug 19 17:31:12 2021 -0700 +++ b/libinterp/dldfcn/__glpk__.cc Thu Aug 19 22:57:36 2021 -0400 @@ -88,6 +88,8 @@ { int typx = 0; int errnum = 0; + + *time = 0.0; *status = -1; // Initialize status to "bad" value clock_t t_start = clock (); @@ -605,8 +607,9 @@ double fmin = octave_NA; ColumnVector lambda (mrowsA, octave_NA); ColumnVector redcosts (mrowsc, octave_NA); - double time; - int status; + + double time = 0.0; + int status = -1; int errnum = glpk (sense, mrowsc, mrowsA, c, nz, rn.fortran_vec (), cn.fortran_vec (), a.fortran_vec (), b, ctype,