From e36e886cf75b836aba005abea24b955057778ebb Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Wed, 24 Jun 2015 12:22:38 -0500 Subject: [svn-r27277] Bring revision #24353 from revise_chksum_retry branch to revise_chunks. h5committested. --- src/H5ACprivate.h | 60 ++++++++++++++++++++++++++-------------------------- src/H5B2cache.c | 15 ++++++------- src/H5Fint.c | 17 +++++++++------ src/H5Fio.c | 8 +++---- src/H5Fsuper_cache.c | 11 +++++----- src/H5HFcache.c | 12 +++++------ src/H5Ocache.c | 6 +++--- src/H5SMcache.c | 2 +- test/tfile.c | 24 ++++++++++----------- 9 files changed, 80 insertions(+), 75 deletions(-) diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index fa4ccb1..625d77f 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -53,36 +53,36 @@ /* Types of metadata objects cached */ typedef enum { - H5AC_BT_ID = 0, /*B-tree nodes */ - H5AC_SNODE_ID, /*symbol table nodes */ - H5AC_LHEAP_PRFX_ID, /*local heap prefix */ - H5AC_LHEAP_DBLK_ID, /*local heap data block */ - H5AC_GHEAP_ID, /*global heap */ - H5AC_OHDR_ID, /*object header */ - H5AC_OHDR_CHK_ID, /*object header chunk */ - H5AC_OHDR_PROXY_ID, /*object header proxy */ - H5AC_BT2_HDR_ID, /*v2 B-tree header */ - H5AC_BT2_INT_ID, /*v2 B-tree internal node */ - H5AC_BT2_LEAF_ID, /*v2 B-tree leaf node */ - H5AC_FHEAP_HDR_ID, /*fractal heap header */ - H5AC_FHEAP_DBLOCK_ID, /*fractal heap direct block */ - H5AC_FHEAP_IBLOCK_ID, /*fractal heap indirect block */ - H5AC_FSPACE_HDR_ID, /*free space header */ - H5AC_FSPACE_SINFO_ID,/*free space sections */ - H5AC_SOHM_TABLE_ID, /*shared object header message master table */ - H5AC_SOHM_LIST_ID, /*shared message index stored as a list */ - H5AC_EARRAY_HDR_ID, /*extensible array header */ - H5AC_EARRAY_IBLOCK_ID, /*extensible array index block */ - H5AC_EARRAY_SBLOCK_ID, /*extensible array super block */ - H5AC_EARRAY_DBLOCK_ID, /*extensible array data block */ - H5AC_EARRAY_DBLK_PAGE_ID, /*extensible array data block page */ - H5AC_CHUNK_PROXY_ID, /*chunk proxy */ - H5AC_FARRAY_HDR_ID, /*fixed array header */ - H5AC_FARRAY_DBLOCK_ID, /*fixed array data block */ - H5AC_FARRAY_DBLK_PAGE_ID, /*fixed array data block page */ - H5AC_SUPERBLOCK_ID, /* file superblock */ - H5AC_TEST_ID, /*test entry -- not used for actual files */ - H5AC_NTYPES /* Number of types, must be last */ + H5AC_BT_ID = 0, /*B-tree nodes */ + H5AC_SNODE_ID = 1, /*symbol table nodes */ + H5AC_LHEAP_PRFX_ID = 2, /*local heap prefix */ + H5AC_LHEAP_DBLK_ID = 3, /*local heap data block */ + H5AC_GHEAP_ID = 4, /*global heap */ + H5AC_OHDR_ID = 5, /*object header */ + H5AC_OHDR_CHK_ID = 6, /*object header chunk */ + H5AC_OHDR_PROXY_ID = 7, /*object header proxy */ + H5AC_BT2_HDR_ID = 8, /*v2 B-tree header */ + H5AC_BT2_INT_ID = 9, /*v2 B-tree internal node */ + H5AC_BT2_LEAF_ID = 10, /*v2 B-tree leaf node */ + H5AC_FHEAP_HDR_ID = 11, /*fractal heap header */ + H5AC_FHEAP_DBLOCK_ID = 12, /*fractal heap direct block */ + H5AC_FHEAP_IBLOCK_ID = 13, /*fractal heap indirect block */ + H5AC_FSPACE_HDR_ID = 14, /*free space header */ + H5AC_FSPACE_SINFO_ID = 15, /*free space sections */ + H5AC_SOHM_TABLE_ID = 16, /*shared object header message master table */ + H5AC_SOHM_LIST_ID = 17, /*shared message index stored as a list */ + H5AC_EARRAY_HDR_ID = 18, /*extensible array header */ + H5AC_EARRAY_IBLOCK_ID = 19, /*extensible array index block */ + H5AC_EARRAY_SBLOCK_ID = 20, /*extensible array super block */ + H5AC_EARRAY_DBLOCK_ID = 21, /*extensible array data block */ + H5AC_EARRAY_DBLK_PAGE_ID = 22, /*extensible array data block page */ + H5AC_CHUNK_PROXY_ID = 23, /*chunk proxy */ + H5AC_FARRAY_HDR_ID = 24, /*fixed array header */ + H5AC_FARRAY_DBLOCK_ID = 25, /*fixed array data block */ + H5AC_FARRAY_DBLK_PAGE_ID = 26, /*fixed array data block page */ + H5AC_SUPERBLOCK_ID = 27, /*file superblock */ + H5AC_TEST_ID = 28, /*test entry -- not used for actual files */ + H5AC_NTYPES = 29 /*Number of types, must be last */ } H5AC_type_t; /* H5AC_DUMP_STATS_ON_CLOSE should always be FALSE when diff --git a/src/H5B2cache.c b/src/H5B2cache.c index 26e02b7..cde6a82 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -575,7 +575,7 @@ H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ unsigned u; /* Local index variable */ - uint32_t chk_size; /* Exact size of the node with checksum at the end */ + size_t chk_size; /* Exact size of the node with checksum at the end */ H5B2_internal_t *ret_value; /* Return value */ FUNC_ENTER_STATIC @@ -604,10 +604,9 @@ H5B2__cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) internal->shadowed_prev = NULL; /* Internal node prefix header + records + child pointer triplets: size with checksum at the end */ - chk_size = H5B2_INT_PREFIX_SIZE + (udata->nrec * udata->hdr->rrec_size) + ((udata->nrec + 1) * H5B2_INT_POINTER_SIZE(udata->hdr, udata->depth)); - + chk_size = H5B2_INT_PREFIX_SIZE + (udata->nrec * udata->hdr->rrec_size) + ((size_t)(udata->nrec + 1) * H5B2_INT_POINTER_SIZE(udata->hdr, udata->depth)); /* Read and validate internal node from disk */ - if(H5F_read_check_metadata(f, H5FD_MEM_BTREE, H5AC_BT2_INT_ID, addr, udata->hdr->node_size, chk_size, dxpl_id, udata->hdr->page, &computed_chksum) < 0) + if(H5F_read_check_metadata(f, H5FD_MEM_BTREE, H5AC_BT2_INT_ID, addr, (size_t)udata->hdr->node_size, chk_size, dxpl_id, udata->hdr->page, &computed_chksum) < 0) HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "incorrect metadata checksum for v2 internal node") p = udata->hdr->page; @@ -768,7 +767,7 @@ H5B2__cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t add /* Write the B-tree internal node */ HDassert((size_t)(p - internal->hdr->page) <= internal->hdr->node_size); - if(H5F_block_write(f, H5FD_MEM_BTREE, addr, internal->hdr->node_size, dxpl_id, internal->hdr->page) < 0) + if(H5F_block_write(f, H5FD_MEM_BTREE, addr, (size_t)internal->hdr->node_size, dxpl_id, internal->hdr->page) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to save B-tree internal node to disk") internal->cache_info.is_dirty = FALSE; @@ -998,7 +997,7 @@ H5B2__cache_leaf_load(H5F_t H5_ATTR_UNUSED *f, hid_t dxpl_id, haddr_t addr, void uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ unsigned u; /* Local index variable */ - uint32_t chk_size; /* Exact size of the node with checksum at the end */ + size_t chk_size; /* Exact size of the node with checksum at the end */ H5B2_leaf_t *ret_value; /* Return value */ FUNC_ENTER_STATIC @@ -1030,7 +1029,7 @@ H5B2__cache_leaf_load(H5F_t H5_ATTR_UNUSED *f, hid_t dxpl_id, haddr_t addr, void chk_size = H5B2_LEAF_PREFIX_SIZE + (udata->nrec * udata->hdr->rrec_size); /* Read and validate leaf node from disk */ - if(H5F_read_check_metadata(f, H5FD_MEM_BTREE, H5AC_BT2_LEAF_ID, addr, udata->hdr->node_size, chk_size, dxpl_id, udata->hdr->page, &computed_chksum) < 0) + if(H5F_read_check_metadata(f, H5FD_MEM_BTREE, H5AC_BT2_LEAF_ID, addr, (size_t)udata->hdr->node_size, chk_size, dxpl_id, udata->hdr->page, &computed_chksum) < 0) HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "incorrect metadata checksum for v2 leaf node") p = udata->hdr->page; @@ -1157,7 +1156,7 @@ H5B2__cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H /* Write the B-tree leaf node */ HDassert((size_t)(p - leaf->hdr->page) <= leaf->hdr->node_size); - if(H5F_block_write(f, H5FD_MEM_BTREE, addr, leaf->hdr->node_size, dxpl_id, leaf->hdr->page) < 0) + if(H5F_block_write(f, H5FD_MEM_BTREE, addr, (size_t)leaf->hdr->node_size, dxpl_id, leaf->hdr->page) < 0) HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL, "unable to save B-tree leaf node to disk") leaf->cache_info.is_dirty = FALSE; diff --git a/src/H5Fint.c b/src/H5Fint.c index 856d88f..3887222 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -1081,7 +1081,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, if(!file->read_attempts) file->read_attempts = H5F_SWMR_METADATA_READ_ATTEMPTS; /* Turn off accumulator */ - shared->feature_flags = lf->feature_flags & ~H5FD_FEAT_ACCUMULATE_METADATA; + shared->feature_flags = lf->feature_flags & ~(unsigned)H5FD_FEAT_ACCUMULATE_METADATA; if(H5FD_set_feature_flags(lf, shared->feature_flags) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, NULL, "can't set feature_flags in VFD") } else @@ -1089,8 +1089,11 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, /* Determine the # of bins for metdata read retries */ file->retries_nbins = 0; - if(file->read_attempts > 1) - file->retries_nbins = HDlog10((double)(file->read_attempts - 1)) + 1; + if(file->read_attempts > 1) { + double tmp; + tmp = HDlog10((double)(file->read_attempts - 1)); + file->retries_nbins = (unsigned)tmp + 1; + } /* Initialize the tracking for metadata read retries */ for(i = 0; i < H5AC_NTYPES; i++) @@ -2107,9 +2110,10 @@ done: *------------------------------------------------------------------------- */ herr_t -H5F_track_metadata_read_retries(H5F_t *f, H5AC_type_t actype, unsigned retries) +H5F_track_metadata_read_retries(H5F_t *f, unsigned actype, unsigned retries) { unsigned log_ind; /* Index to the array of retries based on log10 of retries */ + double tmp; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -2124,11 +2128,12 @@ H5F_track_metadata_read_retries(H5F_t *f, H5AC_type_t actype, unsigned retries) /* Allocate memory for retries */ if(f->retries[actype] == NULL) - if((f->retries[actype] = (uint32_t *)HDcalloc(f->retries_nbins, sizeof(uint32_t))) == NULL) + if((f->retries[actype] = (uint32_t *)HDcalloc((size_t)f->retries_nbins, sizeof(uint32_t))) == NULL) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") /* Index to retries based on log10 */ - log_ind = HDlog10((double)retries); + tmp = HDlog10((double)retries); + log_ind = (unsigned)tmp; HDassert(log_ind < f->retries_nbins); /* Increment the # of the "retries" */ diff --git a/src/H5Fio.c b/src/H5Fio.c index 4bca8a7..296a707 100644 --- a/src/H5Fio.c +++ b/src/H5Fio.c @@ -327,11 +327,11 @@ H5F_get_checksums(uint8_t *buf, size_t chk_size, uint32_t *s_chksum/*out*/, uint *------------------------------------------------------------------------- */ herr_t -H5F_read_check_metadata(H5F_t *f, H5FD_mem_t type, H5AC_type_t actype, haddr_t addr, size_t read_size, size_t chk_size, +H5F_read_check_metadata(H5F_t *f, H5FD_mem_t type, unsigned actype, haddr_t addr, size_t read_size, size_t chk_size, hid_t dxpl_id, uint8_t *buf/*out*/, uint32_t *chksum/*out*/) { - size_t tries, max_tries; /* The # of read attempts */ - size_t retries; /* The # of retries */ + unsigned tries, max_tries; /* The # of read attempts */ + unsigned retries; /* The # of retries */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ herr_t ret_value = SUCCEED; /* Return value */ @@ -364,7 +364,7 @@ H5F_read_check_metadata(H5F_t *f, H5FD_mem_t type, H5AC_type_t actype, haddr_t a if(retries) { /* Does not track 0 retry */ HDfprintf(stderr, "%s: SUCCESS after %u retries; actype=%u\n", FUNC, retries, actype); if(H5F_track_metadata_read_retries(f, actype, retries) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, NULL, "cannot track read tries = %u ", retries) + HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "cannot track read tries = %u ", retries) } /* Return the computed checksum */ diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c index fa2b648..2b5239d 100644 --- a/src/H5Fsuper_cache.c +++ b/src/H5Fsuper_cache.c @@ -135,14 +135,14 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda haddr_t eof; /* end of file address */ uint8_t sizeof_addr; /* Size of offsets in the file (in bytes) */ uint8_t sizeof_size; /* Size of lengths in the file (in bytes) */ - const size_t fixed_size = H5F_SUPERBLOCK_FIXED_SIZE; /*fixed sizeof superblock */ + const size_t fixed_size = H5F_SUPERBLOCK_FIXED_SIZE; /*fixed sizeof superblock */ size_t variable_size; /*variable sizeof superblock */ uint8_t *p; /* Temporary pointer into encoding buffer */ unsigned super_vers; /* Superblock version */ hbool_t *dirtied = (hbool_t *)_udata; /* Set up dirtied out value */ - size_t tries, max_tries; /* The # of read attempts to try */ - size_t fixed_tries; /* The # of read attempts to try for the fixed-size portion */ - size_t retries; /* The # of retries */ + unsigned tries, max_tries; /* The # of read attempts to try */ + unsigned fixed_tries; /* The # of read attempts to try for the fixed-size portion */ + unsigned retries; /* The # of retries */ uint32_t computed_chksum; /* Computed checksum */ uint32_t stored_chksum; /* Checksum read from file */ H5F_super_t *ret_value; /* Return value */ @@ -180,6 +180,8 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "can't get property list") + H5_CHECK_OVERFLOW(fixed_size, size_t, haddr_t); + /* Get the # of read attempts */ tries = max_tries = f->read_attempts; do { @@ -187,7 +189,6 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void *_uda do { /* Read fixed-size portion of the superblock */ p = sbuf; - H5_CHECK_OVERFLOW(fixed_size, size_t, haddr_t); if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, (haddr_t)fixed_size) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "set end of space allocation request failed") if(H5FD_read(lf, dxpl, H5FD_MEM_SUPER, (haddr_t)0, fixed_size, p) < 0) diff --git a/src/H5HFcache.c b/src/H5HFcache.c index 4066b7b..70dd569 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -425,9 +425,9 @@ H5HF_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) const uint8_t *p; /* Pointer into raw data buffer */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ - size_t tries, max_tries; /* The # of read attempts */ - size_t fixed_tries; /* The # of read attempts for the minimum portion */ - size_t retries; /* The # of retries */ + unsigned tries, max_tries; /* The # of read attempts */ + unsigned fixed_tries; /* The # of read attempts for the minimum portion */ + unsigned retries; /* The # of retries */ H5HF_hdr_t *ret_value; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -1497,9 +1497,9 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) haddr_t heap_addr; /* Address of heap header in the file */ uint32_t computed_chksum; /* Computed metadata checksum value */ uint32_t stored_chksum; /* Metadata checksum value */ - size_t tries, max_tries; /* The # of read attempts */ - size_t retries; /* The # of retries */ - size_t chk_size; /* The size for validating checksum */ + unsigned tries, max_tries; /* The # of read attempts */ + unsigned retries; /* The # of retries */ + size_t chk_size; /* The size for validating checksum */ uint8_t *chk_p; /* Pointer to the area for validating checksum */ size_t read_size; /* Size of filtered direct block to read */ H5HF_direct_t *ret_value; /* Return value */ diff --git a/src/H5Ocache.c b/src/H5Ocache.c index fe4e439..6085222 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -323,9 +323,9 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) size_t spec_read_size; /* Size of buffer to speculatively read in */ size_t buf_size; /* Size of prefix+chunk #0 buffer */ haddr_t eoa; /* Relative end of file address */ - size_t tries, max_tries; /* The # of read attempts */ - size_t retries; /* The # of retries */ - size_t fixed_tries; /* The # of read attempts for prefix */ + unsigned tries, max_tries; /* The # of read attempts */ + unsigned retries; /* The # of retries */ + unsigned fixed_tries; /* The # of read attempts for prefix */ uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ H5O_t *ret_value; /* Return value */ diff --git a/src/H5SMcache.c b/src/H5SMcache.c index d48aea9..72f5913 100644 --- a/src/H5SMcache.c +++ b/src/H5SMcache.c @@ -475,7 +475,7 @@ H5SM_list_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata) uint32_t stored_chksum; /* Stored metadata checksum value */ uint32_t computed_chksum; /* Computed metadata checksum value */ size_t u; /* Counter variable for messages in list */ - uint32_t chk_size; /* Exact size with checksum at the end */ + size_t chk_size; /* Exact size with checksum at the end */ H5SM_list_t *ret_value; /* Return value */ FUNC_ENTER_NOAPI_NOINIT diff --git a/test/tfile.c b/test/tfile.c index 4c599b7..f22586d 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -3720,11 +3720,11 @@ test_swmr_read(void) static void test_metadata_read_attempts(void) { - hid_t fapl; /* File access property list */ - hid_t file_fapl; /* The file's access property list */ - hid_t fid, fid1, fid2, fid3; /* File IDs */ - unsigned attempts; /* The # of read attempts */ - herr_t ret; /* Generic return value */ + hid_t fapl; /* File access property list */ + hid_t file_fapl; /* The file's access property list */ + hid_t fid, fid1, fid2; /* File IDs */ + unsigned attempts; /* The # of read attempts */ + herr_t ret; /* Generic return value */ /* Output message about test being performed */ MESSAGE(5, ("Testing H5Pget/set_metadata_read_attempts()\n")); @@ -4063,7 +4063,7 @@ test_metadata_read_attempts(void) /* Create a file */ fid = H5Fcreate(FILE1, H5F_ACC_TRUNC|H5F_ACC_SWMR_WRITE, H5P_DEFAULT, fapl); - CHECK(fid1, FAIL, "H5Fcreate"); + CHECK(fid, FAIL, "H5Fcreate"); /* Close the file */ ret = H5Fclose(fid); @@ -4092,7 +4092,7 @@ test_metadata_read_attempts(void) /* Open file again with SWMR access and default fapl */ fid = H5Fopen(FILE1, H5F_ACC_SWMR_READ, H5P_DEFAULT); - CHECK(fid2, FAIL, "H5Fopen"); + CHECK(fid, FAIL, "H5Fopen"); /* Get file's fapl */ file_fapl = H5Fget_access_plist(fid); @@ -4121,7 +4121,7 @@ test_metadata_read_attempts(void) /* Create a file */ fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - CHECK(fid1, FAIL, "H5Fcreate"); + CHECK(fid, FAIL, "H5Fcreate"); /* Close the file */ ret = H5Fclose(fid); @@ -4129,7 +4129,7 @@ test_metadata_read_attempts(void) /* Open file again with SWMR access and default fapl */ fid1 = H5Fopen(FILE1, H5F_ACC_RDONLY|H5F_ACC_SWMR_READ, H5P_DEFAULT); - CHECK(fid2, FAIL, "H5Fopen"); + CHECK(fid1, FAIL, "H5Fopen"); /* Create a copy of file access property list */ fapl = H5Pcreate(H5P_FILE_ACCESS); @@ -4141,7 +4141,7 @@ test_metadata_read_attempts(void) /* Open file again with SWMR access and fapl (non-default & set to 9) */ fid2 = H5Fopen(FILE1, (H5F_ACC_RDONLY | H5F_ACC_SWMR_READ), fapl); - CHECK(fid3, FAIL, "H5Fopen"); + CHECK(fid2, FAIL, "H5Fopen"); /* Re-open fid1 */ fid = H5Freopen(fid1); @@ -4221,7 +4221,7 @@ test_metadata_read_attempts(void) /* Open file again with non-SWMR access and fapl (non-default & set to 9) */ fid2 = H5Fopen(FILE1, H5F_ACC_RDONLY, fapl); - CHECK(fid3, FAIL, "H5Fopen"); + CHECK(fid2, FAIL, "H5Fopen"); /* Re-open fid1 */ fid = H5Freopen(fid1); @@ -4331,7 +4331,7 @@ test_metadata_read_retries_info(void) /* Initialize buffer data */ for(i = n = 0; i < 6; i++) for(j = 0; j < 10; j++) - buf[i][j] = n++; + buf[i][j] = (int)n++; /* Write to the 2 datasets */ ret = H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); -- cgit v0.12