summaryrefslogtreecommitdiff
path: root/native
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2008-01-11 22:14:30 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2008-01-11 22:14:30 +0000
commitbf810c054dd07f60420fdb77fb11f8b7c2ec3a8e (patch)
treea0d1d26ec0aca720b75b0fabf21de24b22e32413 /native
parent19d2fd74b3243b0450a5f17324eb29fb2d087b52 (diff)
downloadclasspath-bf810c054dd07f60420fdb77fb11f8b7c2ec3a8e.tar.gz
2008-01-09 Stefan Huehner <stefan@huehner.org>
* native/jni/java-io/java_io_VMObjectStreamClass.c, * native/jni/java-lang/java_lang_VMDouble.c, * native/jni/java-net/java_net_VMInetAddress.c: Don't discard const by casting (const char *) to (char *) when it's not needed.
Diffstat (limited to 'native')
-rw-r--r--native/jni/java-io/java_io_VMObjectStreamClass.c2
-rw-r--r--native/jni/java-lang/java_lang_VMDouble.c2
-rw-r--r--native/jni/java-net/java_net_VMInetAddress.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/native/jni/java-io/java_io_VMObjectStreamClass.c b/native/jni/java-io/java_io_VMObjectStreamClass.c
index 8c2556bcf..f5d785ecd 100644
--- a/native/jni/java-io/java_io_VMObjectStreamClass.c
+++ b/native/jni/java-io/java_io_VMObjectStreamClass.c
@@ -175,7 +175,7 @@ getFieldReference (JNIEnv * env, jobject field, const char *type)
* If it isn't an array class then the actual field type descriptor
* starts with 'L', ends with ';' and has '/' instead of '.'.
*/
- type_len = strlen ((char *) type_name);
+ type_len = strlen (type_name);
if (type_name[0] != '[')
{
/* XXX - FIXME - should not use dynamic allocation in core lib. */
diff --git a/native/jni/java-lang/java_lang_VMDouble.c b/native/jni/java-lang/java_lang_VMDouble.c
index 723f09032..e861b9107 100644
--- a/native/jni/java-lang/java_lang_VMDouble.c
+++ b/native/jni/java-lang/java_lang_VMDouble.c
@@ -468,7 +468,7 @@ Java_java_lang_VMDouble_parseDouble
return val;
}
- buf = (char *) (*env)->GetStringUTFChars (env, str, &isCopy);
+ buf = (*env)->GetStringUTFChars (env, str, &isCopy);
if (buf == NULL)
{
/* OutOfMemoryError already thrown */
diff --git a/native/jni/java-net/java_net_VMInetAddress.c b/native/jni/java-net/java_net_VMInetAddress.c
index 43f2d9146..6ee7773b8 100644
--- a/native/jni/java-net/java_net_VMInetAddress.c
+++ b/native/jni/java-net/java_net_VMInetAddress.c
@@ -225,7 +225,7 @@ Java_java_net_VMInetAddress_getHostByName (JNIEnv * env,
result = cpnet_getHostByName (env, hostname, &addresses, &addresses_count);
if (result != CPNATIVE_OK || addresses_count == 0)
{
- JCL_ThrowException (env, UNKNOWN_HOST_EXCEPTION, (char *) hostname);
+ JCL_ThrowException (env, UNKNOWN_HOST_EXCEPTION, hostname);
return (jobjectArray) NULL;
}
(*env)->ReleaseStringUTFChars (env, host, hostname);