diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-08-12 21:11:00 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-08-12 21:11:00 (GMT) |
commit | 54d5a565f95f83655d8bcccb017da6164860afa7 (patch) | |
tree | 07d5429ca460bcfc12cd167fa97a8bbb8011ac69 /tools/lib/h5tools_str.c | |
parent | b95672cdcb6fb81f24a8a3dc00e7d233e65e9d87 (diff) | |
download | hdf5-54d5a565f95f83655d8bcccb017da6164860afa7.zip hdf5-54d5a565f95f83655d8bcccb017da6164860afa7.tar.gz hdf5-54d5a565f95f83655d8bcccb017da6164860afa7.tar.bz2 |
[svn-r19237] Description:
Clean up misc. compiler warnings.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
Mac OS X/32 10.6.4 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Mac OS X/32 10.6.4 (amazon) w/parallel, in debug mode
Diffstat (limited to 'tools/lib/h5tools_str.c')
-rw-r--r-- | tools/lib/h5tools_str.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 55596cd..c5f10b8 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; @@ -934,7 +933,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)) { @@ -1112,7 +1111,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]; @@ -1130,9 +1129,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, "}"); |