# HG changeset patch # User sla # Date 1394030598 -3600 # Node ID af6eda86177e25fc7870481286234cc6c80733f5 # Parent 63ec3bde101c474844d7c944d8d2c5b64e0f2401 8036675: Compiler warnings in serviceability code Reviewed-by: alanb, mgronlun diff -r 63ec3bde101c -r af6eda86177e jdk/src/share/demo/jvmti/hprof/hprof_init.c --- a/jdk/src/share/demo/jvmti/hprof/hprof_init.c Wed Mar 05 13:28:37 2014 +0000 +++ b/jdk/src/share/demo/jvmti/hprof/hprof_init.c Wed Mar 05 15:43:18 2014 +0100 @@ -237,7 +237,7 @@ * such a connection can't be made. */ static int -connect_to_socket(char *hostname, unsigned short port) +connect_to_socket(char *hostname, int port) { int fd; @@ -251,7 +251,7 @@ } /* create a socket */ - fd = md_connect(hostname, port); + fd = md_connect(hostname, (unsigned short)port); return fd; } @@ -817,7 +817,7 @@ if ( gdata->net_port > 0 ) { LOG2("Agent_OnLoad", "Connecting to socket"); - gdata->fd = connect_to_socket(gdata->net_hostname, (unsigned short)gdata->net_port); + gdata->fd = connect_to_socket(gdata->net_hostname, gdata->net_port); if (gdata->fd <= 0) { char errmsg[120]; diff -r 63ec3bde101c -r af6eda86177e jdk/src/share/native/sun/tracing/dtrace/JVM.c --- a/jdk/src/share/native/sun/tracing/dtrace/JVM.c Wed Mar 05 13:28:37 2014 +0000 +++ b/jdk/src/share/native/sun/tracing/dtrace/JVM.c Wed Mar 05 15:43:18 2014 +0100 @@ -287,9 +287,9 @@ if (name != NULL) { int i; - int len = (*env)->GetStringUTFLength(env, name); + jsize len = (*env)->GetStringUTFLength(env, name); int unicode_len = (*env)->GetStringLength(env, name); - if (len >= sizeof(buf)) { + if (len >= (jsize)sizeof(buf)) { utfName = malloc(len + 1); if (utfName == NULL) { goto free_body;