summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-05-03 00:25:57 (GMT)
committerGitHub <noreply@github.com>2022-05-03 00:25:57 (GMT)
commit08861aa903510e9f7ba89f79590f852e5aae1f37 (patch)
treef6ca17a30cc666e11d5a1792d1cc6b110093a9ca /tools
parentdad94a100ed813aab7267f261a2abbfb7016a63f (diff)
downloadhdf5-08861aa903510e9f7ba89f79590f852e5aae1f37.zip
hdf5-08861aa903510e9f7ba89f79590f852e5aae1f37.tar.gz
hdf5-08861aa903510e9f7ba89f79590f852e5aae1f37.tar.bz2
Fixes unused/unset variable warnings from aocc (#1712)
* Fixes unused/unset variable warnings from aocc * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
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);