From f974cba664c48c968a1b1498360f14029ba2bd8b Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Fri, 6 Jan 2006 23:13:12 +0000 Subject: [PATCH] avoid signed/unsigned warns git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8264 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Lib/typemaps/swigtype.swg | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SWIG/Lib/typemaps/swigtype.swg b/SWIG/Lib/typemaps/swigtype.swg index d020ad2da..6822a0523 100644 --- a/SWIG/Lib/typemaps/swigtype.swg +++ b/SWIG/Lib/typemaps/swigtype.swg @@ -131,7 +131,7 @@ %typemap(globalin) SWIGTYPE [ANY] { if (inp) { size_t ii = 0; - for (; ii < $dim0; ++ii) $1[ii] = $input[ii]; + for (; ii < (size_t)$dim0; ++ii) $1[ii] = $input[ii]; } else { %variable_nullref("$type","$name"); } @@ -145,7 +145,7 @@ } else if (inp) { size_t ii = 0; $basetype *dest = %static_cast($1, $basetype *); - for (; ii < $dim0; ++ii) dest[ii] = inp[ii]; + for (; ii < (size_t)$dim0; ++ii) dest[ii] = inp[ii]; } else { %variable_nullref("$type", "$name"); } @@ -159,12 +159,12 @@ if (inp) { $basetype (*dest)[$dim1] = %static_cast($1, $basetype (*)[$dim1]); size_t ii = 0; - for (; ii < $dim0; ++ii) { + for (; ii < (size_t)$dim0; ++ii) { $basetype *ip = inp[ii]; if (ip) { $basetype *dp = dest[ii]; size_t jj = 0; - for (; jj < $dim1; ++jj) dp[jj] = ip[jj]; + for (; jj < (size_t)$dim1; ++jj) dp[jj] = ip[jj]; } else { %variable_nullref("$type","$name"); } @@ -179,12 +179,12 @@ if (inp) { $basetype (*dest)[$dim1] = %static_cast($1, $basetype (*)[$dim1]); size_t ii = 0; - for (; ii < $dim0; ++ii) { + for (; ii < (size_t)$dim0; ++ii) { $basetype *ip = inp[ii]; if (ip) { $basetype *dp = dest[ii]; size_t jj = 0; - for (; jj < $dim1; ++jj) dp[jj] = ip[jj]; + for (; jj < (size_t)$dim1; ++jj) dp[jj] = ip[jj]; } else { %variable_nullref("$type","$name"); }