comparison liboctave/numeric/LSODE.cc @ 26569:0e77df67b522 stable

Add static compile-time checking of printf functions in liboctave. * util/lo-error.h: Use macro OCTAVE_FORMAT_PRINTF for printf functions. * array/Array.h: Use format specifier "z" for type size_t. * array/Array-util.cc, numeric/oct-norm.cc: Supply a format string of "%s" when printing a single string. * array/idx-vector.cc, array/MatrixType.cc, array/Sparse.cc, numeric/DASPK.cc, numeric/DASRT.cc, numeric/DASSL.cc, numeric/LSODE.cc, util/lo-array-errwarn.cc, util/sparse-util.cc: Use preprocessor macro OCTAVE_IDX_TYPE_FORMAT as the format identifier for octave_idx_type. * util/f77-fcn.c: Cast width argument to int. * util/lo-utils.cc: Pass missing argument c0.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 17 Jan 2019 19:25:55 +0100
parents 00f796120a6d
children 2e5d8cdc7087
comparison
equal deleted inserted replaced
26567:bf05a7c16e9e 26569:0e77df67b522
22 22
23 #if defined (HAVE_CONFIG_H) 23 #if defined (HAVE_CONFIG_H)
24 # include "config.h" 24 # include "config.h"
25 #endif 25 #endif
26 26
27 #include <cinttypes>
27 #include <sstream> 28 #include <sstream>
28 29
29 #include "LSODE.h" 30 #include "LSODE.h"
30 #include "f77-fcn.h" 31 #include "f77-fcn.h"
31 #include "lo-error.h" 32 #include "lo-error.h"
300 break; 301 break;
301 302
302 default: 303 default:
303 integration_error = true; 304 integration_error = true;
304 (*current_liboctave_error_handler) 305 (*current_liboctave_error_handler)
305 ("unrecognized value of istate (= %d) returned from lsode", istate); 306 ("unrecognized value of istate (= %" OCTAVE_IDX_TYPE_FORMAT ") "
307 "returned from lsode", istate);
306 break; 308 break;
307 } 309 }
308 310
309 return retval; 311 return retval;
310 } 312 }