comparison libinterp/corefcn/__pchip_deriv__.cc @ 19908:5261186f1b00

__pchip_deriv__.cc: Stop variable might be clobbered by 'longjmp' warning. * __pchip_deriv__.cc: Declare loop index i to be volatile.
author Rik <rik@octave.org>
date Fri, 27 Feb 2015 15:53:42 -0800
parents 4ae2987c5f66
children a9574e3c6e9e
comparison
equal deleted inserted replaced
19907:d575cd1e0da7 19908:5261186f1b00
90 octave_idx_type ierr; 90 octave_idx_type ierr;
91 const octave_idx_type incfd = rows ? nyr : 1; 91 const octave_idx_type incfd = rows ? nyr : 1;
92 volatile const octave_idx_type inc = rows ? 1 : nyr; 92 volatile const octave_idx_type inc = rows ? 1 : nyr;
93 volatile octave_idx_type k = 0; 93 volatile octave_idx_type k = 0;
94 94
95 for (octave_idx_type i = (rows ? nyr : nyc); i > 0; i--) 95 for (volatile octave_idx_type i = (rows ? nyr : nyc); i > 0; i--)
96 { 96 {
97 F77_XFCN (pchim, PCHIM, (nx, xvec.data (), 97 F77_XFCN (pchim, PCHIM, (nx, xvec.data (),
98 ymat.data () + k * inc, 98 ymat.data () + k * inc,
99 dmat.fortran_vec () + k * inc, 99 dmat.fortran_vec () + k * inc,
100 incfd, &ierr)); 100 incfd, &ierr));
137 octave_idx_type ierr; 137 octave_idx_type ierr;
138 const octave_idx_type incfd = rows ? nyr : 1; 138 const octave_idx_type incfd = rows ? nyr : 1;
139 volatile const octave_idx_type inc = rows ? 1 : nyr; 139 volatile const octave_idx_type inc = rows ? 1 : nyr;
140 volatile octave_idx_type k = 0; 140 volatile octave_idx_type k = 0;
141 141
142 for (octave_idx_type i = (rows ? nyr : nyc); i > 0; i--) 142 for (volatile octave_idx_type i = (rows ? nyr : nyc); i > 0; i--)
143 { 143 {
144 F77_XFCN (dpchim, DPCHIM, (nx, xvec.data (), 144 F77_XFCN (dpchim, DPCHIM, (nx, xvec.data (),
145 ymat.data () + k * inc, 145 ymat.data () + k * inc,
146 dmat.fortran_vec () + k * inc, 146 dmat.fortran_vec () + k * inc,
147 incfd, &ierr)); 147 incfd, &ierr));