From 06614ebb793a11664ea329f81e46b7407e047df4 Mon Sep 17 00:00:00 2001 From: Simon Marchetto Date: Tue, 21 Oct 2014 10:03:29 +0200 Subject: [PATCH] scilab: fix compilation warnings in primitive_types test --- Lib/scilab/sciexception.swg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/scilab/sciexception.swg b/Lib/scilab/sciexception.swg index 2a7af4644..a5eb4c00f 100644 --- a/Lib/scilab/sciexception.swg +++ b/Lib/scilab/sciexception.swg @@ -17,20 +17,20 @@ size_t, size_t&, ptrdiff_t, ptrdiff_t& { char obj[20]; - sprintf(obj, "%d", $1); + sprintf(obj, "%d", (int)$1); SWIG_Scilab_Raise_Ex(obj, "$type", $descriptor); } %typemap(throws, noblock=1) enum SWIGTYPE { char obj[20]; - sprintf(obj, "%d", $1); + sprintf(obj, "%d", (int)$1); SWIG_Scilab_Raise_Ex(obj, "$type", $descriptor); } %typemap(throws, noblock=1) float, double, float&, double& { char obj[20]; - sprintf(obj, "%5.3f", $1); + sprintf(obj, "%5.3f", (double)$1); SWIG_Scilab_Raise_Ex(obj, "$type", $descriptor); } @@ -44,7 +44,7 @@ %typemap(throws, noblock=1) char, char& { char obj[1]; - sprintf(obj, "%c", $1); + sprintf(obj, "%c", (char)$1); SWIG_Scilab_Raise_Ex(obj, "$type", $descriptor); }