summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/src/h5ls/h5ls.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index c30c08f..228893a 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -1657,7 +1657,6 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
hid_t space = H5I_INVALID_HID;
hid_t type = H5I_INVALID_HID;
hsize_t size[H5S_MAX_RANK];
- hsize_t nelmts = 1;
int ndims;
int i;
H5S_class_t space_type;
@@ -1699,10 +1698,8 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
case H5S_SIMPLE:
/* simple dataspace */
h5tools_str_append(&buffer, " {");
- for (i = 0; i < ndims; i++) {
+ for (i = 0; i < ndims; i++)
h5tools_str_append(&buffer, "%s%" PRIuHSIZE, i ? ", " : "", size[i]);
- nelmts *= size[i];
- }
h5tools_str_append(&buffer, "}\n");
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols,
(hsize_t)0, (hsize_t)0);