8036675: Compiler warnings in serviceability code

Reviewed-by: alanb, mgronlun
This commit is contained in:
Staffan Larsen 2014-03-05 15:43:18 +01:00
parent 9b7198c0bb
commit 61da35fe43
2 changed files with 5 additions and 5 deletions

View File

@ -237,7 +237,7 @@ list_all_tables(void)
* 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 @@ connect_to_socket(char *hostname, unsigned short port)
}
/* create a socket */
fd = md_connect(hostname, port);
fd = md_connect(hostname, (unsigned short)port);
return fd;
}
@ -817,7 +817,7 @@ parse_options(char *command_line_options)
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];

View File

@ -287,9 +287,9 @@ Java_sun_tracing_dtrace_JVM_defineClass0(
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;