diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2019-10-01 15:33:35 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2019-10-11 16:53:41 (GMT) |
commit | db8a59fbb2907aac63b21ed7c8e88860b2e0fbc8 (patch) | |
tree | 1f55c7a97ecb1fa5f2b776c43c62504201d1bda9 /test | |
parent | 3819640e3c7c2967c426f8bfc95d302f0ae0491a (diff) | |
download | hdf5-db8a59fbb2907aac63b21ed7c8e88860b2e0fbc8.zip hdf5-db8a59fbb2907aac63b21ed7c8e88860b2e0fbc8.tar.gz hdf5-db8a59fbb2907aac63b21ed7c8e88860b2e0fbc8.tar.bz2 |
Merge pull request #1959 from develop to 1.12.
Diffstat (limited to 'test')
-rw-r--r-- | test/dtypes.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/dtypes.c b/test/dtypes.c index c3f80d6..1534a0d 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -7648,8 +7648,7 @@ test_versionbounds(void) H5F_t *filep = NULL; /* Pointer to internal structure of a file */ H5T_t *dtypep = NULL; /* Pointer to internal structure of a datatype */ hsize_t arr_dim[] = {ARRAY_LEN}; /* Length of the array */ - int i, j; /* Indices for iterating over versions */ - H5F_libver_t low, high; /* File format bounds */ + int low, high; /* Indices for iterating over versions */ H5F_libver_t versions[] = {H5F_LIBVER_EARLIEST, H5F_LIBVER_V18, H5F_LIBVER_V110, H5F_LIBVER_V112}; int versions_count = 4; /* Number of version bounds in the array */ unsigned highest_version; /* Highest version in nested datatypes */ @@ -7751,13 +7750,13 @@ test_versionbounds(void) skipping invalid combinations */ /* Create the file, create and write to a dataset with compound datatype */ /* Verify the dataset's datatype and its members */ - for(i = 0, low = versions[i]; i < versions_count; i++) { + for(low = 0; low < versions_count; low++) { - for(j = 0, high = versions[j]; j < versions_count; j++) { + for(high = 0; high < versions_count; high++) { /* Set version bounds */ H5E_BEGIN_TRY { - ret = H5Pset_libver_bounds(fapl, low, high); + ret = H5Pset_libver_bounds(fapl, versions[low], versions[high]); } H5E_END_TRY; if (ret < 0) /* Invalid low/high combinations */ @@ -7783,7 +7782,7 @@ test_versionbounds(void) highest_version = dtypep->shared->version; /* Verify version of the datatype recursevily */ - ret = verify_version(dset_dtype, low, &highest_version); + ret = verify_version(dset_dtype, versions[low], &highest_version); /* Close the dataset's datatype */ if (H5Tclose(dset_dtype) < 0) TEST_ERROR |