changeset 26159:aa678451b758

Silence compiler warning about incorrect format specifier (bug #55046). * hex2num.cc, mex.cc: Use format specifier %zd for size_t.
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 02 Dec 2018 17:21:09 +0100
parents e5a40e1395fb
children a61d3d3463e0
files libinterp/corefcn/hex2num.cc libinterp/corefcn/mex.cc
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/hex2num.cc	Sat Dec 01 03:25:02 2018 -0800
+++ b/libinterp/corefcn/hex2num.cc	Sun Dec 02 17:21:09 2018 +0100
@@ -68,7 +68,7 @@
   const size_t nchars = 2 * nbytes;
 
   if (nc > nchars)
-    error ("hex2num: S must be no more than %d characters", nchars);
+    error ("hex2num: S must be no more than %zd characters", nchars);
 
   size_t j = 0;
 
--- a/libinterp/corefcn/mex.cc	Sat Dec 01 03:25:02 2018 -0800
+++ b/libinterp/corefcn/mex.cc	Sun Dec 02 17:21:09 2018 +0100
@@ -2180,7 +2180,7 @@
     if (! ptr)
       {
         // FIXME: could use "octave_new_handler();" instead
-        error ("%s: failed to allocate %d bytes of memory",
+        error ("%s: failed to allocate %zd bytes of memory",
                function_name (), n);
       }