diff options
author | Quincey Koziol <koziol@koziol.gov> | 2019-06-28 14:10:43 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@koziol.gov> | 2019-06-28 14:10:43 (GMT) |
commit | d5130bb57332ce0049302c5836bbf666b23513cd (patch) | |
tree | fd710a4a2d419a0d3829a933905d8e5bef0f9e7f /src/H5C.c | |
parent | 2c69584fb124c20e1dd06c31f2baf240b50b381c (diff) | |
download | hdf5-d5130bb57332ce0049302c5836bbf666b23513cd.zip hdf5-d5130bb57332ce0049302c5836bbf666b23513cd.tar.gz hdf5-d5130bb57332ce0049302c5836bbf666b23513cd.tar.bz2 |
Updated configure & CMake compiler flags for GCC 8.x, along with corresponding
changes to warnhist script (and some extra improvements for condensing C++
and Java warnings), and fixed a bunch of warnings.
Diffstat (limited to 'src/H5C.c')
-rw-r--r-- | src/H5C.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -106,6 +106,9 @@ /* Local Typedefs */ /******************/ +/* Alias for pointer to cache entry, for use when allocating sequences of them */ +typedef H5C_cache_entry_t *H5C_cache_entry_ptr_t; + /********************/ /* Local Prototypes */ @@ -207,8 +210,8 @@ H5FL_DEFINE(H5C_tag_info_t); /* Declare a free list to manage the H5C_t struct */ H5FL_DEFINE_STATIC(H5C_t); -/* Declare a free list to manage flush dependency arrays */ -H5FL_BLK_DEFINE_STATIC(parent); +/* Declare a free list to manage arrays of cache entries */ +H5FL_SEQ_DEFINE_STATIC(H5C_cache_entry_ptr_t); @@ -3600,7 +3603,7 @@ H5C_create_flush_dependency(void * parent_thing, void * child_thing) /* Array does not exist yet, allocate it */ HDassert(!child_entry->flush_dep_parent); - if(NULL == (child_entry->flush_dep_parent = (H5C_cache_entry_t **)H5FL_BLK_MALLOC(parent, H5C_FLUSH_DEP_PARENT_INIT * sizeof(H5C_cache_entry_t *)))) + if(NULL == (child_entry->flush_dep_parent = H5FL_SEQ_MALLOC(H5C_cache_entry_ptr_t, H5C_FLUSH_DEP_PARENT_INIT))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for flush dependency parent list") child_entry->flush_dep_parent_nalloc = H5C_FLUSH_DEP_PARENT_INIT; } /* end if */ @@ -3608,7 +3611,7 @@ H5C_create_flush_dependency(void * parent_thing, void * child_thing) /* Resize existing array */ HDassert(child_entry->flush_dep_parent); - if(NULL == (child_entry->flush_dep_parent = (H5C_cache_entry_t **)H5FL_BLK_REALLOC(parent, child_entry->flush_dep_parent, 2 * child_entry->flush_dep_parent_nalloc * sizeof(H5C_cache_entry_t *)))) + if(NULL == (child_entry->flush_dep_parent = H5FL_SEQ_REALLOC(H5C_cache_entry_ptr_t, child_entry->flush_dep_parent, 2 * child_entry->flush_dep_parent_nalloc))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for flush dependency parent list") child_entry->flush_dep_parent_nalloc *= 2; } /* end else */ @@ -3766,12 +3769,12 @@ H5C_destroy_flush_dependency(void *parent_thing, void * child_thing) /* Shrink or free the parent array if apporpriate */ if(child_entry->flush_dep_nparents == 0) { - child_entry->flush_dep_parent = (H5C_cache_entry_t **)H5FL_BLK_FREE(parent, child_entry->flush_dep_parent); + child_entry->flush_dep_parent = H5FL_SEQ_FREE(H5C_cache_entry_ptr_t, child_entry->flush_dep_parent); child_entry->flush_dep_parent_nalloc = 0; } /* end if */ else if(child_entry->flush_dep_parent_nalloc > H5C_FLUSH_DEP_PARENT_INIT && child_entry->flush_dep_nparents <= (child_entry->flush_dep_parent_nalloc / 4)) { - if(NULL == (child_entry->flush_dep_parent = (H5C_cache_entry_t **)H5FL_BLK_REALLOC(parent, child_entry->flush_dep_parent, (child_entry->flush_dep_parent_nalloc / 4) * sizeof(H5C_cache_entry_t *)))) + if(NULL == (child_entry->flush_dep_parent = H5FL_SEQ_REALLOC(H5C_cache_entry_ptr_t, child_entry->flush_dep_parent, child_entry->flush_dep_parent_nalloc / 4))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for flush dependency parent list") child_entry->flush_dep_parent_nalloc /= 4; } /* end if */ |