summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5Cpkg.h2
-rw-r--r--src/H5Dchunk.c13
-rw-r--r--src/H5FSsection.c10
-rw-r--r--src/H5Fsuper_cache.c14
-rw-r--r--src/H5Pmapl.c3
-rw-r--r--src/H5private.h14
6 files changed, 32 insertions, 24 deletions
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index 9156c0d..b8648f0 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -4694,7 +4694,7 @@ struct H5C_t {
uint32_t num_last_entries;
#if H5C_DO_SANITY_CHECKS
int32_t slist_len_increase;
- ssize_t slist_size_increase;
+ int64_t slist_size_increase;
#endif /* H5C_DO_SANITY_CHECKS */
/* Fields for maintaining list of tagged entries */
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 53ca7d1..a6b22f8 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -284,7 +284,8 @@ static int H5D__chunk_format_convert_cb(const H5D_chunk_rec_t *chunk_rec, void *
static herr_t H5D__chunk_set_info_real(H5O_layout_chunk_t *layout, unsigned ndims,
const hsize_t *curr_dims, const hsize_t *max_dims);
static void *H5D__chunk_mem_alloc(size_t size, const H5O_pline_t *pline);
-static void *H5D__chunk_mem_xfree(void *chk, const void *pline);
+static void *H5D__chunk_mem_xfree(void *chk, void *pline);
+static void H5D__chunk_mem_xfree_wrapper(void *chk, void *pline);
static void *H5D__chunk_mem_realloc(void *chk, size_t size,
const H5O_pline_t *pline);
static herr_t H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last);
@@ -1431,7 +1432,7 @@ H5D__chunk_mem_alloc(size_t size, const H5O_pline_t *pline)
*-------------------------------------------------------------------------
*/
static void *
-H5D__chunk_mem_xfree(void *chk, const void *_pline)
+H5D__chunk_mem_xfree(void *chk, void *_pline)
{
const H5O_pline_t *pline = (const H5O_pline_t *)_pline;
@@ -1447,6 +1448,12 @@ H5D__chunk_mem_xfree(void *chk, const void *_pline)
FUNC_LEAVE_NOAPI(NULL)
} /* H5D__chunk_mem_xfree() */
+static void
+H5D__chunk_mem_xfree_wrapper(void *chk, void *_pline)
+{
+ (void)H5D__chunk_mem_xfree(chk, _pline);
+}
+
/*-------------------------------------------------------------------------
* Function: H5D__chunk_mem_realloc
@@ -4451,7 +4458,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
/* (delay allocating fill buffer for VL datatypes until refilling) */
/* (casting away const OK - QAK) */
if(H5D__fill_init(&fb_info, NULL, (H5MM_allocate_t)H5D__chunk_mem_alloc,
- (void *)pline, (H5MM_free_t)H5D__chunk_mem_xfree, (void *)pline,
+ (void *)pline, H5D__chunk_mem_xfree_wrapper, (void *)pline,
&dset->shared->dcpl_cache.fill, dset->shared->type,
dset->shared->type_id, (size_t)0, orig_chunk_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info")
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index df67bd9..cf4a587 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -371,10 +371,10 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n"
/* Check if section info lock count dropped to zero */
if(fspace->sinfo_lock_count == 0) {
hbool_t release_sinfo_space = FALSE; /* Flag to indicate section info space in file should be released */
- hbool_t flush_in_progress = FALSE; /* Is flushing in progress */
+ hbool_t closing_or_flushing = f->shared->closing; /* Is closing or flushing in progress */
- /* Check whether cache is flush_in_progress */
- if(H5AC_get_cache_flush_in_progress(f->shared->cache, &flush_in_progress) < 0)
+ /* Check whether cache-flush is in progress if closing is not. */
+ if(!closing_or_flushing && H5AC_get_cache_flush_in_progress(f->shared->cache, &closing_or_flushing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get flush_in_progress")
/* Check if we actually protected the section info */
@@ -390,7 +390,7 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n"
cache_flags |= H5AC__DIRTIED_FLAG;
/* On file close or flushing, does not allow section info to shrink in size */
- if(f->shared->closing || flush_in_progress) {
+ if(closing_or_flushing) {
if(fspace->sect_size > fspace->alloc_sect_size)
cache_flags |= H5AC__DELETED_FLAG | H5AC__TAKE_OWNERSHIP_FLAG;
else
@@ -441,7 +441,7 @@ HDfprintf(stderr, "%s: Relinquishing section info ownership\n", FUNC);
/* Set flag to release section info space in file */
/* On file close or flushing, only need to release section info with size
bigger than previous section */
- if(f->shared->closing || flush_in_progress) {
+ if(closing_or_flushing) {
if(fspace->sect_size > fspace->alloc_sect_size)
release_sinfo_space = TRUE;
else
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index 125d6cf..ebf4a39 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -347,7 +347,7 @@ static herr_t
H5F__cache_superblock_get_final_load_size(const void *_image, size_t image_len,
void *_udata, size_t *actual_len)
{
- const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
+ const uint8_t *image = _image; /* Pointer into raw data buffer */
H5F_superblock_cache_ud_t *udata = (H5F_superblock_cache_ud_t *)_udata; /* User data */
H5F_super_t sblock; /* Temporary file superblock */
htri_t ret_value = SUCCEED; /* Return value */
@@ -393,7 +393,7 @@ done:
static htri_t
H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata)
{
- const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
+ const uint8_t *image = _image; /* Pointer into raw data buffer */
H5F_superblock_cache_ud_t *udata = (H5F_superblock_cache_ud_t *)_udata; /* User data */
uint32_t stored_chksum; /* Stored metadata checksum value */
uint32_t computed_chksum; /* Computed metadata checksum value */
@@ -439,7 +439,7 @@ H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata,
{
H5F_super_t *sblock = NULL; /* File's superblock */
H5F_superblock_cache_ud_t *udata = (H5F_superblock_cache_ud_t *)_udata; /* User data */
- const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
+ const uint8_t *image = _image; /* Pointer into raw data buffer */
H5F_super_t *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@@ -664,7 +664,7 @@ H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU
void *_thing)
{
H5F_super_t *sblock = (H5F_super_t *)_thing; /* Pointer to the object */
- uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */
+ uint8_t *image = _image; /* Pointer into raw data buffer */
haddr_t rel_eof; /* Relative EOF for file */
herr_t ret_value = SUCCEED; /* Return value */
@@ -870,7 +870,7 @@ static herr_t
H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t image_len,
void *_udata, size_t *actual_len)
{
- const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
+ const uint8_t *image = _image; /* Pointer into raw data buffer */
H5F_drvrinfo_cache_ud_t *udata = (H5F_drvrinfo_cache_ud_t *)_udata; /* User data */
H5O_drvinfo_t drvrinfo; /* Driver info */
herr_t ret_value = SUCCEED; /* Return value */
@@ -916,7 +916,7 @@ H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata,
{
H5O_drvinfo_t *drvinfo = NULL; /* Driver info */
H5F_drvrinfo_cache_ud_t *udata = (H5F_drvrinfo_cache_ud_t *)_udata; /* User data */
- const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */
+ const uint8_t *image = _image; /* Pointer into raw data buffer */
char drv_name[9]; /* Name of driver */
H5O_drvinfo_t *ret_value = NULL; /* Return value */
@@ -1010,7 +1010,7 @@ H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t len,
void *_thing)
{
H5O_drvinfo_t *drvinfo = (H5O_drvinfo_t *)_thing; /* Pointer to the object */
- uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */
+ uint8_t *image = _image; /* Pointer into raw data buffer */
uint8_t *dbuf; /* Pointer to beginning of driver info */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Pmapl.c b/src/H5Pmapl.c
index fe5be0f..59da91a 100644
--- a/src/H5Pmapl.c
+++ b/src/H5Pmapl.c
@@ -138,6 +138,7 @@ done:
} /* end H5P__macc_reg_prop() */
+#ifdef H5_HAVE_MAP_API
/*-------------------------------------------------------------------------
* Function: H5Pset_map_iterate_hints
*
@@ -214,4 +215,4 @@ H5Pget_map_iterate_hints(hid_t mapl_id, size_t *key_prefetch_size, size_t *key_a
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pget_map_iterate_hints() */
-
+#endif /* H5_HAVE_MAP_API */
diff --git a/src/H5private.h b/src/H5private.h
index 0bfc91b..bdc6268 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1365,25 +1365,25 @@ typedef off_t h5_stat_size_t;
#define HDstrcpy(X,Y) strcpy(X,Y)
#endif /* HDstrcpy */
#ifndef HDstrcspn
- #define HDstrcspn(X,Y) strcspn(X,Y)
+ #define HDstrcspn strcspn
#endif /* HDstrcspn */
#ifndef HDstrerror
- #define HDstrerror(N) strerror(N)
+ #define HDstrerror strerror
#endif /* HDstrerror */
#ifndef HDstrftime
- #define HDstrftime(S,Z,F,T) strftime(S,Z,F,T)
+ #define HDstrftime strftime
#endif /* HDstrftime */
#ifndef HDstrlen
- #define HDstrlen(S) strlen(S)
+ #define HDstrlen strlen
#endif /* HDstrlen */
#ifndef HDstrncat
- #define HDstrncat(X,Y,Z) strncat(X,Y,Z)
+ #define HDstrncat strncat
#endif /* HDstrncat */
#ifndef HDstrncmp
- #define HDstrncmp(X,Y,Z) strncmp(X,Y,Z)
+ #define HDstrncmp strncmp
#endif /* HDstrncmp */
#ifndef HDstrncpy
- #define HDstrncpy(X,Y,Z) strncpy(X,Y,Z)
+ #define HDstrncpy strncpy
#endif /* HDstrncpy */
#ifndef HDstrpbrk
#define HDstrpbrk(X,Y) strpbrk(X,Y)