diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2019-06-25 19:51:30 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2019-06-25 19:51:30 (GMT) |
commit | a3cfb08a10fcf7d820b274a61b845c6eb9f2a715 (patch) | |
tree | 4902b56a95c5d6ff838213438bb21625f9cc7162 | |
parent | 1d8f7bf297100ec11204442708a7f670a89f3f02 (diff) | |
parent | b40a6f75aaf3d40c6ea5f9cc8beb74ae8aaaba96 (diff) | |
download | hdf5-a3cfb08a10fcf7d820b274a61b845c6eb9f2a715.zip hdf5-a3cfb08a10fcf7d820b274a61b845c6eb9f2a715.tar.gz hdf5-a3cfb08a10fcf7d820b274a61b845c6eb9f2a715.tar.bz2 |
Merge pull request #1774 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:trefer_memory_bug to develop
* commit 'b40a6f75aaf3d40c6ea5f9cc8beb74ae8aaaba96':
Fixed a memory issue in trefer.c.
-rw-r--r-- | test/trefer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/trefer.c b/test/trefer.c index 4bf9caf..9af5c89 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -526,7 +526,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high) hssize_t hssize_ret; /* hssize_t return value */ htri_t tri_ret; /* htri_t return value */ herr_t ret; /* Generic return value */ - haddr_t addr = HADDR_UNDEF; /* test for undefined reference */ + hdset_reg_ref_t undef_reg[1]; /* test for undefined reference */ hid_t dset_NA; /* Dataset id for undefined reference */ hid_t space_NA; /* Dataspace id for undefined reference */ hsize_t dims_NA[1] = {1}; /* Dims array for undefined reference */ @@ -744,7 +744,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high) CHECK(ret, FAIL, "H5Dread"); /* Try to read an unaddressed dataset */ - dset2 = H5Rdereference2(dset1, dapl_id, H5R_DATASET_REGION, &addr); + dset2 = H5Rdereference2(dset1, dapl_id, H5R_DATASET_REGION, undef_reg); VERIFY(dset2, FAIL, "H5Rdereference2 haddr_undef"); /* Try to open objects */ @@ -1781,8 +1781,8 @@ test_reference(void) test_reference_obj(); /* Test basic H5R object reference code */ /* Loop through all the combinations of low/high version bounds */ - for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) { - for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) { + for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; H5_INC_ENUM(H5F_libver_t, low)) { + for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; H5_INC_ENUM(H5F_libver_t, high)) { /* Invalid combinations, just continue */ if(high == H5F_LIBVER_EARLIEST || high < low) |