8059904: libjvm_db.c warnings in solaris/sparc build with SS
Summary: Fix warnings by correcting the cast of pointers returned from calloc()
Reviewed-by: dholmes
Contributed-by: serguei.spitsyn@oracle.com
--- a/hotspot/src/os/bsd/dtrace/libjvm_db.c Thu Oct 09 04:45:58 2014 -0700
+++ b/hotspot/src/os/bsd/dtrace/libjvm_db.c Thu Oct 09 16:56:27 2014 -0700
@@ -347,10 +347,10 @@
&J->Number_of_heaps, sizeof(J->Number_of_heaps));
/* Allocate memory for heap configurations */
- J->Heap_low = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
- J->Heap_high = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
- J->Heap_segmap_low = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
- J->Heap_segmap_high = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+ J->Heap_low = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+ J->Heap_high = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+ J->Heap_segmap_low = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+ J->Heap_segmap_high = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
/* Read code heap configurations */
for (i = 0; i < J->Number_of_heaps; ++i) {
--- a/hotspot/src/os/solaris/dtrace/libjvm_db.c Thu Oct 09 04:45:58 2014 -0700
+++ b/hotspot/src/os/solaris/dtrace/libjvm_db.c Thu Oct 09 16:56:27 2014 -0700
@@ -347,10 +347,10 @@
&J->Number_of_heaps, sizeof(J->Number_of_heaps));
/* Allocate memory for heap configurations */
- J->Heap_low = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
- J->Heap_high = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
- J->Heap_segmap_low = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
- J->Heap_segmap_high = (jvm_agent_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+ J->Heap_low = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+ J->Heap_high = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+ J->Heap_segmap_low = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
+ J->Heap_segmap_high = (uint64_t*)calloc(J->Number_of_heaps, sizeof(uint64_t));
/* Read code heap configurations */
for (i = 0; i < J->Number_of_heaps; ++i) {