summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5B2cache.c3
-rw-r--r--src/H5C.c2
-rw-r--r--src/H5Dchunk.c11
-rw-r--r--src/H5EAcache.c4
-rw-r--r--src/H5FAcache.c2
5 files changed, 15 insertions, 7 deletions
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index 09bb389..65286e6 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -398,6 +398,7 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5B2_HDR_VERSION;
/* B-tree type */
+ HDassert(hdr->cls->id <= 255);
*image++ = (uint8_t)hdr->cls->id;
/* Node size (in bytes) */
@@ -818,6 +819,7 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5B2_INT_VERSION;
/* B-tree type */
+ HDassert(internal->hdr->cls->id <= 255);
*image++ = (uint8_t)internal->hdr->cls->id;
HDassert((size_t)(image - (uint8_t *)_image) == (H5B2_INT_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM));
@@ -1219,6 +1221,7 @@ H5B2__cache_leaf_serialize(const H5F_t H5_ATTR_UNUSED *f, void *_image, size_t H
*image++ = H5B2_LEAF_VERSION;
/* B-tree type */
+ HDassert(leaf->hdr->cls->id <= 255);
*image++ = (uint8_t)leaf->hdr->cls->id;
HDassert((size_t)(image - (uint8_t *)_image) == (H5B2_LEAF_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM));
diff --git a/src/H5C.c b/src/H5C.c
index d6e2147..e530eef 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -3856,7 +3856,7 @@ H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr,
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_STATIC_NOERR
+ FUNC_ENTER_STATIC
/* Sanity checking */
HDassert(cache_ptr);
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index db234bb..66b6676 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -2179,7 +2179,7 @@ H5D__create_chunk_mem_map_1d(const H5D_chunk_map_t *fm)
/* Iterate over each chunk in the chunk list */
curr_node = H5SL_first(fm->sel_chunks);
while(curr_node) {
- hsize_t schunk_points; /* Number of elements in chunk selection */
+ hsize_t chunk_points; /* Number of elements in chunk selection */
hsize_t tmp_count = 1;
/* Get pointer to chunk's information */
@@ -2190,12 +2190,12 @@ H5D__create_chunk_mem_map_1d(const H5D_chunk_map_t *fm)
if((chunk_info->mspace = H5S_copy(fm->mem_space, TRUE, FALSE)) == NULL)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy memory space")
- schunk_points = H5S_GET_SELECT_NPOINTS(chunk_info->fspace);
+ chunk_points = (hsize_t)H5S_GET_SELECT_NPOINTS(chunk_info->fspace);
- if(H5S_select_hyperslab(chunk_info->mspace, H5S_SELECT_SET, mem_sel_start, NULL, &tmp_count, &schunk_points) < 0)
+ if(H5S_select_hyperslab(chunk_info->mspace, H5S_SELECT_SET, mem_sel_start, NULL, &tmp_count, &chunk_points) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSELECT, FAIL, "can't create chunk memory selection")
- mem_sel_start[0] += schunk_points;
+ mem_sel_start[0] += chunk_points;
/* Get the next chunk node in the skip list */
curr_node = H5SL_next(curr_node);
@@ -5665,7 +5665,6 @@ H5D__chunk_addrmap_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
H5D_chunk_it_ud2_t *udata = (H5D_chunk_it_ud2_t *)_udata; /* User data for callback */
unsigned rank = udata->common.layout->ndims - 1; /* # of dimensions of dataset */
hsize_t chunk_index;
- int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -5675,7 +5674,7 @@ H5D__chunk_addrmap_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
/* Set it in the userdata to return */
udata->chunk_addr[chunk_index] = chunk_rec->chunk_addr;
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(H5_ITER_CONT)
} /* H5D__chunk_addrmap_cb() */
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index 7b1968e..1fd9c44 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -487,6 +487,7 @@ H5EA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5EA_HDR_VERSION;
/* Extensible array type */
+ HDassert(hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)hdr->cparam.cls->id;
/* General array creation/configuration information */
@@ -875,6 +876,7 @@ H5EA__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5EA_IBLOCK_VERSION;
/* Extensible array type */
+ HDassert(iblock->hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)iblock->hdr->cparam.cls->id;
/* Address of array header for array which owns this block */
@@ -1284,6 +1286,7 @@ H5EA__cache_sblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5EA_SBLOCK_VERSION;
/* Extensible array type */
+ HDassert(sblock->hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)sblock->hdr->cparam.cls->id;
/* Address of array header for array which owns this block */
@@ -1698,6 +1701,7 @@ H5EA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5EA_DBLOCK_VERSION;
/* Extensible array type */
+ HDassert(dblock->hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)dblock->hdr->cparam.cls->id;
/* Address of array header for array which owns this block */
diff --git a/src/H5FAcache.c b/src/H5FAcache.c
index e142ae2..2f0d1b4 100644
--- a/src/H5FAcache.c
+++ b/src/H5FAcache.c
@@ -417,6 +417,7 @@ H5FA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5FA_HDR_VERSION;
/* Fixed array type */
+ HDassert(hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)hdr->cparam.cls->id;
/* General array creation/configuration information */
@@ -805,6 +806,7 @@ H5FA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5FA_DBLOCK_VERSION;
/* Fixed array type */
+ HDassert(dblock->hdr->cparam.cls->id <= 255);
*image++ = (uint8_t)dblock->hdr->cparam.cls->id;
/* Address of array header for array which owns this block */