< prev index next >
src/share/vm/prims/jvmtiEnvBase.cpp
Print this page
rev 9088 : 8139040: Fix initializations before ShouldNotReachHere() etc. and enable -Wuninitialized on linux.
Reviewed-by: stuefe, coleenp
@@ -510,11 +510,11 @@
// In the fullness of time, all users of the method should instead
// directly use allocate, besides being cleaner and faster, this will
// mean much better out of memory handling
unsigned char *
JvmtiEnvBase::jvmtiMalloc(jlong size) {
- unsigned char* mem;
+ unsigned char* mem = NULL;
jvmtiError result = allocate(size, &mem);
assert(result == JVMTI_ERROR_NONE, "Allocate failed");
return mem;
}
@@ -1030,11 +1030,11 @@
ret.entry_count = count_locked_objects(owning_thread, hobj);
}
// implied else: entry_count == 0
}
- jint nWant, nWait;
+ jint nWant = 0, nWait = 0;
if (mon != NULL) {
// this object has a heavyweight monitor
nWant = mon->contentions(); // # of threads contending for monitor
nWait = mon->waiters(); // # of threads in Object.wait()
ret.waiter_count = nWant + nWait;
< prev index next >