diff 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
line wrap: on
line diff
--- a/liboctave/numeric/LSODE.cc	Thu Jan 17 09:25:35 2019 +0100
+++ b/liboctave/numeric/LSODE.cc	Thu Jan 17 19:25:55 2019 +0100
@@ -24,6 +24,7 @@
 #  include "config.h"
 #endif
 
+#include <cinttypes>
 #include <sstream>
 
 #include "LSODE.h"
@@ -302,7 +303,8 @@
     default:
       integration_error = true;
       (*current_liboctave_error_handler)
-        ("unrecognized value of istate (= %d) returned from lsode", istate);
+        ("unrecognized value of istate (= %" OCTAVE_IDX_TYPE_FORMAT ") "
+         "returned from lsode", istate);
       break;
     }