summaryrefslogtreecommitdiffstats
path: root/c++/test/tattr.cpp
diff options
context:
space:
mode:
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__);