8080401: Uninitialised variable in hotspot/src/os/solaris/dtrace/

Reduce the warnings

Reviewed-by: sla, dsamersoff
This commit is contained in:
Serguei Spitsyn 2015-08-07 09:22:29 -07:00
parent 6ee89e55d5
commit 4f489580d7
6 changed files with 10 additions and 12 deletions

View File

@ -134,7 +134,7 @@ StubQueue* AbstractInterpreter::_code = NULL;
}
void gen_prologue(GEN_variant gen_variant) {
const char *suffix;
const char *suffix = "Undefined-Suffix";
switch(gen_variant) {
case GEN_OFFSET: suffix = ".h"; break;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -227,7 +227,7 @@ static void delete_attach_file(pid_t pid) {
/* attach to given JVM */
jvm_t* jvm_attach(pid_t pid) {
jvm_t* jvm;
int door_fd, attach_fd, i;
int door_fd, attach_fd, i = 0;
jvm = (jvm_t*) calloc(1, sizeof(jvm_t));
if (jvm == NULL) {
@ -292,14 +292,13 @@ const char* jvm_get_last_error() {
/* detach the givenb JVM */
int jvm_detach(jvm_t* jvm) {
if (jvm) {
int res;
int res = 0;
if (jvm->door_fd != -1) {
if (file_close(jvm->door_fd) != 0) {
set_jvm_error(JVM_ERR_CANT_CLOSE_DOOR);
res = -1;
} else {
clear_jvm_error();
res = 0;
}
}
free(jvm);

View File

@ -882,7 +882,7 @@ get_real_pc(Nmethod_t *N, uint64_t pc_desc, uint64_t *real_pc)
/* Finds a PcDesc with real-pc equal to N->pc */
static int pc_desc_at(Nmethod_t *N)
{
uint64_t pc_diff;
uint64_t pc_diff = 999;
int32_t offs;
int32_t err;

View File

@ -129,7 +129,7 @@ StubQueue* AbstractInterpreter::_code = NULL;
}
void gen_prologue(GEN_variant gen_variant) {
const char *suffix;
const char *suffix = "Undefined-Suffix";
switch(gen_variant) {
case GEN_OFFSET: suffix = ".h"; break;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -227,7 +227,7 @@ static void delete_attach_file(pid_t pid) {
/* attach to given JVM */
jvm_t* jvm_attach(pid_t pid) {
jvm_t* jvm;
int door_fd, attach_fd, i;
int door_fd, attach_fd, i = 0;
jvm = (jvm_t*) calloc(1, sizeof(jvm_t));
if (jvm == NULL) {
@ -292,14 +292,13 @@ const char* jvm_get_last_error() {
/* detach the givenb JVM */
int jvm_detach(jvm_t* jvm) {
if (jvm) {
int res;
int res = 0;
if (jvm->door_fd != -1) {
if (file_close(jvm->door_fd) != 0) {
set_jvm_error(JVM_ERR_CANT_CLOSE_DOOR);
res = -1;
} else {
clear_jvm_error();
res = 0;
}
}
free(jvm);

View File

@ -882,7 +882,7 @@ get_real_pc(Nmethod_t *N, uint64_t pc_desc, uint64_t *real_pc)
/* Finds a PcDesc with real-pc equal to N->pc */
static int pc_desc_at(Nmethod_t *N)
{
uint64_t pc_diff;
uint64_t pc_diff = 999;
int32_t offs;
int32_t err;