changeset 7229:a008f00ee14c

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
author sspitsyn
date Thu, 09 Oct 2014 16:56:27 -0700
parents def3ccd92f1d
children 008f91ddb031 ab7b1d843bb1
files src/os/bsd/dtrace/libjvm_db.c src/os/solaris/dtrace/libjvm_db.c
diffstat 2 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/bsd/dtrace/libjvm_db.c	Thu Oct 09 04:45:58 2014 -0700
+++ b/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/src/os/solaris/dtrace/libjvm_db.c	Thu Oct 09 04:45:58 2014 -0700
+++ b/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) {