diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2015-09-11 20:26:34 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2015-09-11 20:26:34 (GMT) |
commit | aa62b729d67f082579c9a02e631e06f384aed11d (patch) | |
tree | a2b54800c6f10d4caf6c79b0b9b1eac8c0e751e5 | |
parent | a4e730506f73381d8d3fc768249ce860b23b2d54 (diff) | |
download | hdf5-aa62b729d67f082579c9a02e631e06f384aed11d.zip hdf5-aa62b729d67f082579c9a02e631e06f384aed11d.tar.gz hdf5-aa62b729d67f082579c9a02e631e06f384aed11d.tar.bz2 |
[svn-r27761] Fix the bug uncovered by daily test failure: configure --with-default-api-version=v16.
Tested on jam and moohan.
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | tools/h5format_convert/h5fc_chk_idx.c | 2 | ||||
-rw-r--r-- | tools/h5format_convert/h5fc_gentest.c | 44 | ||||
-rw-r--r-- | tools/h5format_convert/h5format_convert.c | 2 | ||||
-rw-r--r-- | tools/h5format_convert/testfiles/h5fc_version.ddl | 1 | ||||
-rw-r--r-- | tools/h5format_convert/testh5fc.sh.in | 3 |
6 files changed, 24 insertions, 29 deletions
@@ -1301,7 +1301,6 @@ ./tools/h5format_convert/testfiles/h5fc_d_file.ddl ./tools/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl ./tools/h5format_convert/testfiles/h5fc_dname.ddl -./tools/h5format_convert/testfiles/h5fc_version.ddl ./tools/h5format_convert/testfiles/h5fc_nonexistdset_file.ddl ./tools/h5format_convert/testfiles/h5fc_help.ddl ./tools/h5format_convert/testfiles/h5fc_v_all.ddl diff --git a/tools/h5format_convert/h5fc_chk_idx.c b/tools/h5format_convert/h5fc_chk_idx.c index ed3d949..3114379 100644 --- a/tools/h5format_convert/h5fc_chk_idx.c +++ b/tools/h5format_convert/h5fc_chk_idx.c @@ -68,7 +68,7 @@ main(int argc, char *argv[]) } /* Open the dataset */ - if((did = H5Dopen(fid, dname, H5P_DEFAULT)) < 0) { + if((did = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0) { HDfprintf(stderr, "h5fc_chk_idx: unable to open the dataset\n"); exit(EXIT_FAILURE); } diff --git a/tools/h5format_convert/h5fc_gentest.c b/tools/h5format_convert/h5fc_gentest.c index dd0c3dd..de22691 100644 --- a/tools/h5format_convert/h5fc_gentest.c +++ b/tools/h5format_convert/h5fc_gentest.c @@ -56,11 +56,11 @@ static void gen_old(const char *fname) { - hid_t fid; /* file id */ - hid_t gid; /* group id */ - hid_t sid; /* space id */ - hid_t dcpl; /* dataset creation property id */ - hid_t did1, did2; /* dataset id */ + hid_t fid = -1; /* file id */ + hid_t gid = -1; /* group id */ + hid_t sid = -1; /* space id */ + hid_t dcpl = -1; /* dataset creation property id */ + hid_t did1 = -1, did2 = -1; /* dataset id */ hsize_t dims1[1] = {10}; /* dataset dimension */ hsize_t dims2[2] = {4, 6}; /* dataset dimension */ hsize_t c_dims[2] = {2, 3}; /* chunk dimension */ @@ -163,12 +163,12 @@ error: static void gen_new(const char *fname) { - hid_t fid; /* file id */ - hid_t fapl; /* file access property list */ - hid_t gid; /* group id */ - hid_t sid; /* space id */ - hid_t dcpl; /* dataset creation property id */ - hid_t did1, did2; /* dataset id */ + hid_t fid = -1; /* file id */ + hid_t fapl = -1; /* file access property list */ + hid_t gid = -1; /* group id */ + hid_t sid = -1; /* space id */ + hid_t dcpl = -1; /* dataset creation property id */ + hid_t did1 = -1, did2 = -1; /* dataset id */ hsize_t dims2[2] = {4, 6}; /* dataset dimension */ hsize_t max_dims[2]; /* maximum dataset dimension */ hsize_t c_dims[2] = {2, 3}; /* chunk dimension */ @@ -356,12 +356,12 @@ error: static void gen_all(const char *fname) { - hid_t fid; /* file id */ - hid_t fapl; /* file access property list */ - hid_t gid; /* group id */ - hid_t sid; /* space id */ - hid_t dcpl; /* dataset creation property id */ - hid_t did1, did2; /* dataset id */ + hid_t fid = -1; /* file id */ + hid_t fapl = -1; /* file access property list */ + hid_t gid = -1; /* group id */ + hid_t sid = -1; /* space id */ + hid_t dcpl = -1; /* dataset creation property id */ + hid_t did1 = -1, did2 = -1; /* dataset id */ hsize_t dims1[1] = {10}; /* dataset dimension */ hsize_t dims2[2] = {4, 6}; /* dataset dimension */ hsize_t max_dims[2]; /* maximum dataset dimension */ @@ -538,11 +538,11 @@ error: static void gen_edge(const char *fname) { - hid_t fid; /* file id */ - hid_t fapl; /* file access property list */ - hid_t sid; /* dataspace id */ - hid_t dcpl; /* dataset creation property id */ - hid_t did; /* dataset id */ + hid_t fid = -1; /* file id */ + hid_t fapl = -1; /* file access property list */ + hid_t sid = -1; /* dataspace id */ + hid_t dcpl = -1; /* dataset creation property id */ + hid_t did = -1; /* dataset id */ hsize_t dims2[2] = {12, 6}; /* Dataset dimensions */ hsize_t c_dims[2] = {5, 5}; /* Chunk dimensions */ float buf[12][6]; /* Buffer for writing data */ diff --git a/tools/h5format_convert/h5format_convert.c b/tools/h5format_convert/h5format_convert.c index 8c19693..7686acc 100644 --- a/tools/h5format_convert/h5format_convert.c +++ b/tools/h5format_convert/h5format_convert.c @@ -220,7 +220,7 @@ convert(hid_t fid, const char *dname) H5D_chunk_index_t idx_type; /* Open the dataset */ - if((did = H5Dopen(fid, dname, H5P_DEFAULT)) < 0) { + if((did = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0) { error_msg("unable to open dataset \"%s\"\n", dname); h5tools_setstatus(EXIT_FAILURE); goto error; diff --git a/tools/h5format_convert/testfiles/h5fc_version.ddl b/tools/h5format_convert/testfiles/h5fc_version.ddl deleted file mode 100644 index 67bd55c..0000000 --- a/tools/h5format_convert/testfiles/h5fc_version.ddl +++ /dev/null @@ -1 +0,0 @@ -h5format_convert: Version 1.9.222-swmr1 diff --git a/tools/h5format_convert/testh5fc.sh.in b/tools/h5format_convert/testh5fc.sh.in index c732897..7f41a21 100644 --- a/tools/h5format_convert/testh5fc.sh.in +++ b/tools/h5format_convert/testh5fc.sh.in @@ -83,7 +83,6 @@ $SRC_H5FORMCONV_TESTFILES/h5fc_edge.h5 " LIST_OTHER_TEST_FILES=" -$SRC_H5FORMCONV_TESTFILES/h5fc_version.ddl $SRC_H5FORMCONV_TESTFILES/h5fc_help.ddl $SRC_H5FORMCONV_TESTFILES/h5fc_nooption.ddl $SRC_H5FORMCONV_TESTFILES/h5fc_nonexistfile.ddl @@ -255,11 +254,9 @@ COPY_TESTFILES_TO_TESTDIR # # # -# h5format_convert --version # h5format_convert --help # h5format_convert (no options) # h5format_convert nonexist.h5 (no options, file does not exist) -TOOLTEST_OUT h5fc_version.ddl --version TOOLTEST_OUT h5fc_help.ddl --help TOOLTEST_OUT h5fc_nooption.ddl TOOLTEST_OUT h5fc_nonexistfile.ddl nonexist.h5 |