Mercurial > octave
changeset 26558:434c0163d7be stable
Fix uninitialized argument value found by clang static analysis (bug #55440).
* __glpk__.cc (glpk): Move assignment to *time outside of if statement so that
a value is always given.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 16 Jan 2019 11:15:40 -0800 |
parents | 1dcbdc61a518 |
children | 5ace3d2b4674 |
files | libinterp/dldfcn/__glpk__.cc |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/dldfcn/__glpk__.cc Wed Jan 16 10:40:51 2019 -0800 +++ b/libinterp/dldfcn/__glpk__.cc Wed Jan 16 11:15:40 2019 -0800 @@ -286,14 +286,14 @@ redcosts[i] = glp_ipt_col_dual (lp, i+1); } } + } - *time = (clock () - t_start) / CLOCKS_PER_SEC; - } + *time = (clock () - t_start) / CLOCKS_PER_SEC; glp_delete_prob (lp); // Request that GLPK free all memory resources. // This prevents reported memory leaks, but isn't strictly necessary. - // The memory blocks use are allocated once and don't grow with further + // The memory blocks used are allocated once and don't grow with further // calls to glpk so they would be reclaimed anyways when Octave exits. glp_free_env ();