summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-03-05 14:19:02 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-03-05 14:19:02 (GMT)
commit6a2c50b10af4bc88e4b1a1a95cb3f9be813d61f2 (patch)
tree2df899df87c4b55c54faedeceb036b31340ee62f /tools/lib
parent7619eb4b18d1d90db694bb96f2b26a5680150a89 (diff)
downloadhdf5-6a2c50b10af4bc88e4b1a1a95cb3f9be813d61f2.zip
hdf5-6a2c50b10af4bc88e4b1a1a95cb3f9be813d61f2.tar.gz
hdf5-6a2c50b10af4bc88e4b1a1a95cb3f9be813d61f2.tar.bz2
[svn-r22025] Cleanup compiler warnings.
Add HD prefix to tools library based tests. Cleaned allocation/free in tests. Tested: local linux/ h5committetest
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5tools_dump.c16
-rw-r--r--tools/lib/h5tools_str.c9
-rw-r--r--tools/lib/h5trav.c6
3 files changed, 6 insertions, 25 deletions
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 15cb679..432821f 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -189,22 +189,6 @@ const h5tools_dump_header_t* h5tools_dump_header_format;
table_t *h5dump_type_table = NULL; /*type table reference for datatype dump */
/* local prototypes */
-
-hbool_t h5tools_render_element(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx/*in,out*/,
- h5tools_str_t *buffer/*string into which to render */,
- hsize_t *curr_pos/*total data element position*/,
- size_t ncols, hsize_t local_elmt_counter/*element counter*/,
- hsize_t elmt_counter);
-
-hbool_t h5tools_render_region_element(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx/*in,out*/,
- h5tools_str_t *buffer/*string into which to render */,
- hsize_t *curr_pos/*total data element position*/,
- size_t ncols, hsize_t *ptdata,
- hsize_t local_elmt_counter/*element counter*/,
- hsize_t elmt_counter);
-
static int h5tools_print_region_data_blocks(hid_t region_id,
FILE *stream, const h5tool_format_t *info, h5tools_context_t *cur_ctx,
h5tools_str_t *buffer/*string into which to render */, size_t ncols,
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 1d99490..2bbafd8 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -173,7 +173,7 @@ h5tools_str_append(h5tools_str_t *str/*in,out*/, const char *fmt, ...)
*/
size_t newsize = MAX(str->len + nchars + 1, 2 * str->nalloc);
HDassert(newsize > str->nalloc); /*overflow*/
- str->s = HDrealloc(str->s, newsize);
+ str->s = (char*)HDrealloc(str->s, newsize);
HDassert(str->s);
str->nalloc = newsize;
}
@@ -209,7 +209,7 @@ h5tools_str_reset(h5tools_str_t *str/*in,out*/)
{
if (!str->s || str->nalloc <= 0) {
str->nalloc = STR_INIT_LEN;
- str->s = HDmalloc(str->nalloc);
+ str->s = (char*)HDmalloc(str->nalloc);
HDassert(str->s);
}
@@ -282,7 +282,7 @@ h5tools_str_fmt(h5tools_str_t *str/*in,out*/, size_t start, const char *fmt)
size_t n = sizeof(_temp);
if (str->len - start + 1 > n) {
n = str->len - start + 1;
- temp = HDmalloc(n);
+ temp = (char*)HDmalloc(n);
HDassert(temp);
}
@@ -1114,8 +1114,6 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
h5tools_str_append(str, "%s", OPT(info->arr_sep, "," OPTIONAL_LINE_BREAK));
if (info->arr_linebreak && i && i % dims[ndims - 1] == 0) {
- int x;
-
h5tools_str_append(str, "%s", "\n");
h5tools_str_indent(str, info, ctx);
@@ -1123,7 +1121,6 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
else if (i && info->arr_sep) {
/* if next element begin, add next line with indent */
if (is_next_arry_elmt) {
- int x;
is_next_arry_elmt = 0;
h5tools_str_append(str, "%s", "\n ");
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index 3bb8b3f..ad8b9fe 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -151,7 +151,7 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo,
size_t base_len = HDstrlen(udata->base_grp_name);
size_t add_slash = base_len ? ((udata->base_grp_name)[base_len-1] != '/') : 1;
- if(NULL == (new_name = HDmalloc(base_len + add_slash + HDstrlen(path) + 1)))
+ if(NULL == (new_name = (char*)HDmalloc(base_len + add_slash + HDstrlen(path) + 1)))
return(H5_ITER_ERROR);
HDstrcpy(new_name, udata->base_grp_name);
if (add_slash)
@@ -895,7 +895,7 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata)
switch(linfo->type) {
case H5L_TYPE_SOFT:
if(linfo->u.val_size > 0) {
- char *targbuf = HDmalloc(linfo->u.val_size + 1);
+ char *targbuf = (char*)HDmalloc(linfo->u.val_size + 1);
HDassert(targbuf);
H5Lget_val(print_udata->fid, path, targbuf, linfo->u.val_size + 1, H5P_DEFAULT);
@@ -912,7 +912,7 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata)
const char *filename;
const char *objname;
- targbuf = HDmalloc(linfo->u.val_size + 1);
+ targbuf = (char*)HDmalloc(linfo->u.val_size + 1);
HDassert(targbuf);
H5Lget_val(print_udata->fid, path, targbuf, linfo->u.val_size + 1, H5P_DEFAULT);