Mercurial > octave
diff libinterp/corefcn/__pchip_deriv__.cc @ 33037:7d5a531a058a
eliminate obsolete volatile declarations on integer variables (bug #65321)
Affected files: __pchip_deriv__.cc, CSparse.cc, dSparse.cc, lu.cc,
qr.cc, and sparse-qr.cc.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 16 Feb 2024 16:38:35 -0500 |
parents | f53ac65ffba6 |
children |
line wrap: on
line diff
--- a/libinterp/corefcn/__pchip_deriv__.cc Fri Feb 16 14:55:51 2024 -0500 +++ b/libinterp/corefcn/__pchip_deriv__.cc Fri Feb 16 16:38:35 2024 -0500 @@ -75,10 +75,10 @@ F77_INT ierr; const F77_INT incfd = (rows ? to_f77_int (2*nyr) : 2); - volatile const octave_idx_type inc = (rows ? 2 : 2*nyr); - volatile octave_idx_type k = 0; + const octave_idx_type inc = (rows ? 2 : 2*nyr); + octave_idx_type k = 0; - for (volatile octave_idx_type i = (rows ? nyr : nyc); i > 0; i--) + for (octave_idx_type i = (rows ? nyr : nyc); i > 0; i--) { F77_XFCN (pchim, PCHIM, (nx, xvec.data (), reinterpret_cast<float const *> (ymat.data ()) + k * inc, @@ -117,10 +117,10 @@ F77_INT ierr; const F77_INT incfd = (rows ? to_f77_int (nyr) : 1); - volatile const octave_idx_type inc = (rows ? 1 : nyr); - volatile octave_idx_type k = 0; + const octave_idx_type inc = (rows ? 1 : nyr); + octave_idx_type k = 0; - for (volatile octave_idx_type i = (rows ? nyr : nyc); i > 0; i--) + for (octave_idx_type i = (rows ? nyr : nyc); i > 0; i--) { F77_XFCN (pchim, PCHIM, (nx, xvec.data (), ymat.data () + k * inc, @@ -158,10 +158,10 @@ F77_INT ierr; const F77_INT incfd = (rows ? to_f77_int (2*nyr) : 2); - volatile const octave_idx_type inc = (rows ? 2 : 2*nyr); - volatile octave_idx_type k = 0; + const octave_idx_type inc = (rows ? 2 : 2*nyr); + octave_idx_type k = 0; - for (volatile octave_idx_type i = (rows ? nyr : nyc); i > 0; i--) + for (octave_idx_type i = (rows ? nyr : nyc); i > 0; i--) { F77_XFCN (dpchim, DPCHIM, (nx, xvec.data (), reinterpret_cast<double const *> (ymat.data ()) + k * inc, @@ -200,10 +200,10 @@ F77_INT ierr; const F77_INT incfd = (rows ? to_f77_int (nyr) : 1); - volatile const octave_idx_type inc = (rows ? 1 : nyr); - volatile octave_idx_type k = 0; + const octave_idx_type inc = (rows ? 1 : nyr); + octave_idx_type k = 0; - for (volatile octave_idx_type i = (rows ? nyr : nyc); i > 0; i--) + for (octave_idx_type i = (rows ? nyr : nyc); i > 0; i--) { F77_XFCN (dpchim, DPCHIM, (nx, xvec.data (), ymat.data () + k * inc,