diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2012-05-25 17:39:07 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2012-05-25 17:39:07 (GMT) |
commit | eb5b8163f93e4694ae834bac6f002f6ef895ffe8 (patch) | |
tree | eb33855fc79c4fd1defd4a48b8f0552cf1589d3f /tools/h5dump | |
parent | d7bfa3617fefb3d1e0262d8940d687bfa9717667 (diff) | |
download | hdf5-eb5b8163f93e4694ae834bac6f002f6ef895ffe8.zip hdf5-eb5b8163f93e4694ae834bac6f002f6ef895ffe8.tar.gz hdf5-eb5b8163f93e4694ae834bac6f002f6ef895ffe8.tar.bz2 |
[svn-r22411] 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.c | 7 | ||||
-rw-r--r-- | tools/h5dump/h5dump_xml.c | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index b8deaf9..22d2a2b 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -1488,15 +1488,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++; |