summaryrefslogtreecommitdiffstats
path: root/c++/test/tattr.cpp
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-07-11 15:59:51 (GMT)
committerGitHub <noreply@github.com>2022-07-11 15:59:51 (GMT)
commitfa7caf843508b250f085e88cf5edfc2606da1205 (patch)
tree8ecc6f13d62952ab8ee49ea59bae9c2a47684e9b /c++/test/tattr.cpp
parentf599e2ac7fb7fb146b49e2f349a9c100e897f7ef (diff)
downloadhdf5-fa7caf843508b250f085e88cf5edfc2606da1205.zip
hdf5-fa7caf843508b250f085e88cf5edfc2606da1205.tar.gz
hdf5-fa7caf843508b250f085e88cf5edfc2606da1205.tar.bz2
Fixes C++ sign-conversion warnings w/ clang 14 (#1870)
* Fixes sign-conversion warnings w/ clang 14 * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'c++/test/tattr.cpp')
-rw-r--r--c++/test/tattr.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index dc968f9..0a1402c 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -727,13 +727,12 @@ test_attr_compound_read()
// Verify that the fields have the same names as when the type
// was created
- int j;
- for (j = 0; j < fields; j++) {
- H5std_string fieldname = datatype.getMemberName(j);
+ for (int j = 0; j < fields; j++) {
+ H5std_string fieldname = datatype.getMemberName(static_cast<unsigned>(j));
if (!((fieldname == ATTR4_FIELDNAME1) || (fieldname == ATTR4_FIELDNAME2) ||
(fieldname == ATTR4_FIELDNAME3)))
TestErrPrintf("%d:invalid field name for field #%d: %s\n", __LINE__, j, fieldname.c_str());
- } /* end for */
+ }
offset = datatype.getMemberOffset(0);
verify_val(offset, attr4_field1_off, "DataType::getMemberOffset", __LINE__, __FILE__);