summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_str.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/h5tools_str.c')
-rw-r--r--tools/lib/h5tools_str.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index da9218f..46ad8c9 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -305,8 +305,7 @@ h5tools_str_fmt(h5tools_str_t *str/*in,out*/, size_t start, const char *fmt)
*/
char *
h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *info,
- hsize_t elmtno, unsigned ndims, hsize_t min_idx[],
- hsize_t max_idx[], h5tools_context_t *ctx)
+ hsize_t elmtno, unsigned ndims, h5tools_context_t *ctx)
{
size_t i = 0;
hsize_t curr_pos = elmtno;
@@ -358,7 +357,7 @@ h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *info,
*/
char *
h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info,
- hsize_t elmtno, hsize_t *ptdata, unsigned ndims, hsize_t min_idx[], hsize_t max_idx[],
+ hsize_t elmtno, hsize_t *ptdata, unsigned ndims, hsize_t max_idx[],
h5tools_context_t *ctx)
{
hsize_t p_prod[H5S_MAX_RANK];
@@ -414,7 +413,7 @@ h5tools_str_region_prefix(h5tools_str_t *str, const h5tool_format_t *info,
*/
void
h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region,
- const h5tool_format_t *info, h5tools_context_t *ctx)
+ const h5tool_format_t *info)
{
hssize_t nblocks;
hsize_t alloc_size;
@@ -434,7 +433,7 @@ h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region,
alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]);
assert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/
- ptdata = malloc((size_t) alloc_size);
+ ptdata = (hsize_t *)malloc((size_t) alloc_size);
H5_CHECK_OVERFLOW(nblocks, hssize_t, hsize_t);
H5Sget_select_hyper_blocklist(region, (hsize_t)0, (hsize_t)nblocks, ptdata);
@@ -475,7 +474,7 @@ h5tools_str_dump_region_blocks(h5tools_str_t *str, hid_t region,
*/
void
h5tools_str_dump_region_points(h5tools_str_t *str, hid_t region,
- const h5tool_format_t *info, h5tools_context_t *ctx)
+ const h5tool_format_t *info)
{
hssize_t npoints;
hsize_t alloc_size;
@@ -495,7 +494,7 @@ h5tools_str_dump_region_points(h5tools_str_t *str, hid_t region,
alloc_size = npoints * ndims * sizeof(ptdata[0]);
assert(alloc_size == (hsize_t) ((size_t) alloc_size)); /*check for overflow*/
- ptdata = malloc((size_t) alloc_size);
+ ptdata = (hsize_t *)malloc((size_t) alloc_size);
H5_CHECK_OVERFLOW(npoints, hssize_t, hsize_t);
H5Sget_select_elem_pointlist(region, (hsize_t)0, (hsize_t)npoints, ptdata);
@@ -639,7 +638,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
char *name;
unsigned char *ucp_vp = (unsigned char *)vp;
char *cp_vp = (char *)vp;
- hid_t memb, obj, region;
+ hid_t memb, obj;
unsigned nmembs;
static char fmt_llong[8], fmt_ullong[8];
H5T_str_t pad;
@@ -970,7 +969,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
h5tools_str_append(str, "NULL");
}
else {
- h5tools_str_sprint_region(str, info, container, vp, ctx);
+ h5tools_str_sprint_region(str, info, container, vp);
}
}
else if (H5Tequal(type, H5T_STD_REF_OBJ)) {
@@ -1148,7 +1147,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
*/
void
h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info,
- hid_t container, void *vp, h5tools_context_t *ctx)
+ hid_t container, void *vp)
{
hid_t obj, region;
char ref_name[1024];
@@ -1166,9 +1165,9 @@ h5tools_str_sprint_region(h5tools_str_t *str, const h5tool_format_t *info,
region_type = H5Sget_select_type(region);
if(region_type==H5S_SEL_POINTS)
- h5tools_str_dump_region_points(str, region, info, ctx);
+ h5tools_str_dump_region_points(str, region, info);
else
- h5tools_str_dump_region_blocks(str, region, info, ctx);
+ h5tools_str_dump_region_blocks(str, region, info);
h5tools_str_append(str, "}");