8059904: libjvm_db.c warnings in solaris/sparc build with SS
authorsspitsyn
Thu, 09 Oct 2014 16:56:27 -0700
changeset 27158 d94370732d09
parent 27157 364276bc8d8b
child 27159 3d2543e475e4
child 27160 b60dff56e547
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
hotspot/src/os/bsd/dtrace/libjvm_db.c
hotspot/src/os/solaris/dtrace/libjvm_db.c
--- 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) {