summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2015-03-06 19:53:23 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2015-03-06 19:53:23 (GMT)
commit89ffc9f2d7b5c9f929c761823296f60abf4bc7df (patch)
tree521dda7a2680e7ad76e63af969b2bfed0902cf83 /tools/lib
parent84f0d4735a2e4a91d8e7bc0b2028c9234dc9fc7c (diff)
downloadhdf5-89ffc9f2d7b5c9f929c761823296f60abf4bc7df.zip
hdf5-89ffc9f2d7b5c9f929c761823296f60abf4bc7df.tar.gz
hdf5-89ffc9f2d7b5c9f929c761823296f60abf4bc7df.tar.bz2
[svn-r26387] warning fixes from Feb27.
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5trav.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index d0a4a76..90e6d3d 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -50,6 +50,10 @@ typedef struct {
hid_t fid; /* File ID being traversed */
} trav_print_udata_t;
+typedef struct trav_path_op_data_t {
+ const char *path;
+} trav_path_op_data_t;
+
/* format for hsize_t */
#ifdef H5TRAV_PRINT_SPACE
#define HSIZE_T_FORMAT "%" H5_PRINTF_LL_WIDTH "u"
@@ -899,11 +903,11 @@ trav_attr(hid_t
#ifndef H5TRAV_PRINT_SPACE
UNUSED
#endif /* H5TRAV_PRINT_SPACE */
-obj, const char *attr_name, const H5A_info_t UNUSED *ainfo, void *op_data)
+obj, const char *attr_name, const H5A_info_t UNUSED *ainfo, void *_op_data)
{
- char *buf;
+ trav_path_op_data_t *op_data = (trav_path_op_data_t *)_op_data;
+ const char *buf = op_data->path;
- buf = (char*)op_data;
if((strlen(buf)==1) && (*buf=='/'))
printf(" %-10s %s%s", "attribute", buf, attr_name);
else
@@ -1009,10 +1013,14 @@ trav_print_visit_obj(const char *path, const H5O_info_t *oinfo,
/* Check if we've already seen this object */
if(NULL == already_visited) {
+ trav_path_op_data_t op_data;
+
+ op_data.path = path;
/* Finish printing line about object */
printf("\n");
if(trav_verbosity > 0)
- H5Aiterate_by_name(print_udata->fid, path, trav_index_by, trav_index_order, NULL, trav_attr, (void *)path, H5P_DEFAULT);
+ H5Aiterate_by_name(print_udata->fid, path, trav_index_by, trav_index_order,
+ NULL, trav_attr, &op_data, H5P_DEFAULT);
}
else
/* Print the link's original name */