You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/04/25 16:37:39 UTC
svn commit: r768538 - in
/commons/sandbox/runtime/trunk/src/main/native/shared: memory.c string.c
Author: mturk
Date: Sat Apr 25 14:37:38 2009
New Revision: 768538
URL: http://svn.apache.org/viewvc?rev=768538&view=rev
Log:
Fix cast warnings
Modified:
commons/sandbox/runtime/trunk/src/main/native/shared/memory.c
commons/sandbox/runtime/trunk/src/main/native/shared/string.c
Modified: commons/sandbox/runtime/trunk/src/main/native/shared/memory.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/memory.c?rev=768538&r1=768537&r2=768538&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/memory.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/memory.c Sat Apr 25 14:37:38 2009
@@ -458,7 +458,7 @@
ACR_ThrowException(_E, THROW_NMARK, ACR_EX_EINVAL, 0);
return;
}
- if ((doff + size) > dl) {
+ if ((dn + size) > dl) {
ACR_ThrowException(_E, THROW_NMARK, ACR_EX_EINDEX, 0);
return;
}
@@ -481,7 +481,7 @@
ACR_ThrowException(_E, THROW_NMARK, ACR_EX_EINVAL, 0);
return;
}
- if ((doff + size) > dl) {
+ if ((dn + size) > dl) {
ACR_ThrowException(_E, THROW_NMARK, ACR_EX_EINDEX, 0);
return;
}
Modified: commons/sandbox/runtime/trunk/src/main/native/shared/string.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/string.c?rev=768538&r1=768537&r2=768538&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/string.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/string.c Sat Apr 25 14:37:38 2009
@@ -273,7 +273,7 @@
if (s) {
size_t len = wcslen(s);
#if CC_SIZEOF_WCHAR_T == 2
- r = (*_E)->NewString(_E, (const jchar *)s, len);
+ r = (*_E)->NewString(_E, (const jchar *)s, (jsize)len);
#else
jchar *cc;
if ((cc = ACR_Malloc(_E, THROW_FMARK, (len + 1) * sizeof(jchar)))) {