diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2019-01-29 15:15:26 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2019-01-29 15:15:26 (GMT) |
commit | 34473a534836444c2f71a7d0f910bdb3ecf0123e (patch) | |
tree | cda0428217fc4a39722afc9dfd10b34a057b23e2 | |
parent | 49cf6b370f9b4ee2e396491dac9d82b62f8ce727 (diff) | |
parent | a09bcbcb07609ee38a1ccbcfafd4fd5a9dbe27f5 (diff) | |
download | hdf5-34473a534836444c2f71a7d0f910bdb3ecf0123e.zip hdf5-34473a534836444c2f71a7d0f910bdb3ecf0123e.tar.gz hdf5-34473a534836444c2f71a7d0f910bdb3ecf0123e.tar.bz2 |
Merge pull request #1510 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:hdf5_1_10 to hdf5_1_10
* commit 'a09bcbcb07609ee38a1ccbcfafd4fd5a9dbe27f5':
Fixed a bug identified by valgrind in the cork test.
-rw-r--r-- | test/cork.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/cork.c b/test/cork.c index dceaf5a..240be77 100644 --- a/test/cork.c +++ b/test/cork.c @@ -286,19 +286,19 @@ static unsigned verify_obj_dset_cork(hbool_t swmr) { /* Variable Declarations */ - hid_t fid = -1; /* File ID */ + hid_t fid = -1; /* File ID */ hid_t fapl = -1; /* File access property list */ hid_t aid = -1; /* Attribute ID */ hid_t sid = -1, sid2 = -1; /* Dataspace IDs */ hid_t did = -1, did2 = -1; /* Dataset IDs */ hid_t oid = -1; /* Object ID */ - hid_t dcpl2; /* Dataset creation property list */ + hid_t dcpl2; /* Dataset creation property list */ int i = 0; /* Local index variable */ - hsize_t dim[1] = {100}; /* Dataset dimension size */ + hsize_t dim[1] = {100}; /* Dataset dimension size */ hsize_t chunk_dim[1] = {7}; /* Dataset chunk dimension size */ H5O_info_t oinfo, oinfo2; /* Object metadata information */ char attrname[500]; /* Name of attribute */ - unsigned flags; /* File access flags */ + unsigned flags; /* File access flags */ if(swmr) { TESTING("cork status for dataset objects with attributes (SWMR)"); @@ -341,7 +341,7 @@ verify_obj_dset_cork(hbool_t swmr) TEST_ERROR /* Attach and write to an attribute to the dataset: DSET */ - if((aid = H5Acreate2(did, ATTR, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if((aid = H5Acreate2(did, ATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Verify cork status of the dataset: DSET */ @@ -380,11 +380,11 @@ verify_obj_dset_cork(hbool_t swmr) TEST_ERROR /* Attach 8 attributes to the dataset */ - for(i = 0;i < 8; i++) { - sprintf(attrname, "attr %d", i); - if((aid = H5Acreate2(did2, attrname, H5T_NATIVE_UINT, sid2, H5P_DEFAULT, H5P_DEFAULT)) < 0) + for(i = 0; i < 8; i++) { + HDsprintf(attrname, "attr %d", i); + if((aid = H5Acreate2(did2, attrname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - if(H5Awrite(aid, H5T_NATIVE_UINT, &i) < 0) + if(H5Awrite(aid, H5T_NATIVE_INT, &i) < 0) TEST_ERROR if(H5Aclose(aid) < 0) TEST_ERROR |