summaryrefslogtreecommitdiffstats
path: root/tools/h5dump
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-05-25 17:58:59 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-05-25 17:58:59 (GMT)
commitfe744bd8df1c0ce23c2631773a9463e781d84052 (patch)
tree3ce1e18ffc3555d0fe65118a56de19dd0d7fe774 /tools/h5dump
parent2f7d953a9d328862297be8c33ecdaaeadd14ae14 (diff)
downloadhdf5-fe744bd8df1c0ce23c2631773a9463e781d84052.zip
hdf5-fe744bd8df1c0ce23c2631773a9463e781d84052.tar.gz
hdf5-fe744bd8df1c0ce23c2631773a9463e781d84052.tar.bz2
[svn-r22412] reduce compiler warnings by removing unreferenced variables and adding cast
Tested: local linux
Diffstat (limited to 'tools/h5dump')
-rw-r--r--tools/h5dump/h5dump_ddl.c7
-rw-r--r--tools/h5dump/h5dump_xml.c3
2 files changed, 6 insertions, 4 deletions
diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c
index b0136c8..db78118 100644
--- a/tools/h5dump/h5dump_ddl.c
+++ b/tools/h5dump/h5dump_ddl.c
@@ -1467,15 +1467,18 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
if(sset) {
unsigned int i;
+ unsigned int ndims;
hid_t sid = H5Dget_space(dsetid);
- int ndims = H5Sget_simple_extent_ndims(sid);
+ int ndims_res = H5Sget_simple_extent_ndims(sid);
H5Sclose(sid);
- if(ndims < 0) {
+ if(ndims_res < 0) {
error_msg("H5Sget_simple_extent_ndims failed\n");
h5tools_setstatus(EXIT_FAILURE);
return;
}
+ else
+ ndims = ndims_res;
if(!sset->start.data || !sset->stride.data || !sset->count.data || !sset->block.data) {
/* they didn't specify a ``stride'' or ``block''. default to 1 in all
diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c
index 0c48216..1a29659 100644
--- a/tools/h5dump/h5dump_xml.c
+++ b/tools/h5dump/h5dump_xml.c
@@ -1781,7 +1781,6 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset, int UNU
hsize_t nelmts = 1;
int ndims;
int i;
- int depth;
int status = -1;
int stdindent = COL; /* should be 3 */
void *buf = NULL;
@@ -2950,7 +2949,7 @@ xml_print_refs(hid_t did, int source)
string_dataformat.do_escape = display_escape;
outputformat = &string_dataformat;
- for (i = 0; i < ssiz; i++) {
+ for (i = 0; i < (hsize_t)ssiz; i++) {
const char *path = lookup_ref_path(*refbuf);
ctx.indent_level++;