diff options
Diffstat (limited to 'src/H5Cimage.c')
-rw-r--r-- | src/H5Cimage.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5Cimage.c b/src/H5Cimage.c index 2a94fca..da4ac33 100644 --- a/src/H5Cimage.c +++ b/src/H5Cimage.c @@ -2784,8 +2784,6 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr) size_t image_len; size_t entry_header_len; size_t fd_parents_list_len; - int i; - unsigned j; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2862,7 +2860,7 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr) HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for fd parent addrs buffer") - for (i = 0; i < (int)(entry_ptr->fd_parent_count); i++) { + for (int i = 0; i < (int)(entry_ptr->fd_parent_count); i++) { entry_ptr->fd_parent_addrs[i] = entry_ptr->flush_dep_parent[i]->addr; HDassert(H5F_addr_defined(entry_ptr->fd_parent_addrs[i])); } /* end for */ @@ -2946,12 +2944,14 @@ H5C__prep_for_file_close__scan_entries(const H5F_t *f, H5C_t *cache_ptr) HDassert(entries_visited == cache_ptr->index_len); HDassert(num_entries_in_image <= num_entries_tentatively_in_image); - j = 0; - for (i = H5C_MAX_RING_IN_IMAGE + 1; i <= H5C_RING_SB; i++) +#ifndef NDEBUG + unsigned j = 0; + for (int i = H5C_MAX_RING_IN_IMAGE + 1; i <= H5C_RING_SB; i++) j += cache_ptr->index_ring_len[i]; /* This will change */ HDassert(entries_visited == (num_entries_tentatively_in_image + j)); +#endif cache_ptr->num_entries_in_image = num_entries_in_image; entries_visited = 0; |