summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5Aint.c2
-rw-r--r--src/H5B2cache.c9
-rw-r--r--src/H5B2int.c14
-rw-r--r--src/H5Dchunk.c13
-rw-r--r--src/H5EAcache.c12
-rw-r--r--src/H5FAcache.c6
-rw-r--r--src/H5FScache.c8
-rw-r--r--src/H5Fprivate.h2
-rw-r--r--src/H5HFtest.c2
-rw-r--r--src/H5Oainfo.c2
-rw-r--r--src/H5Oattr.c2
-rw-r--r--src/H5Ofill.c4
-rw-r--r--src/H5Ofsinfo.c4
-rw-r--r--src/H5Oginfo.c4
-rw-r--r--src/H5Oint.c4
-rw-r--r--src/H5Olayout.c2
-rw-r--r--src/H5Olinfo.c2
-rw-r--r--src/H5Olink.c2
-rw-r--r--src/H5Osdspace.c2
-rw-r--r--src/H5SMcache.c2
-rw-r--r--src/H5SMmessage.c2
-rw-r--r--src/H5Sprivate.h2
-rw-r--r--src/H5Sselect.c4
-rw-r--r--src/H5Tbit.c4
-rw-r--r--src/H5Ztrans.c2
25 files changed, 60 insertions, 52 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c
index 807c67e..50e7fc5 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -2020,7 +2020,7 @@ H5A__set_version(const H5F_t *f, H5A_t *attr)
version = H5O_ATTR_VERSION_1; /* Write out basic version */
/* Upgrade to the version indicated by the file's low bound if higher */
- version = MAX(version, (uint8_t)H5O_attr_ver_bounds[H5F_LOW_BOUND(f)]);
+ version = (uint8_t)MAX(version, (uint8_t)H5O_attr_ver_bounds[H5F_LOW_BOUND(f)]);
/* Version bounds check */
if(version > H5O_attr_ver_bounds[H5F_HIGH_BOUND(f)])
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index 2e1d37b..9a13a78 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -398,7 +398,8 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5B2_HDR_VERSION;
/* B-tree type */
- *image++ = hdr->cls->id;
+ HDassert(hdr->cls->id <= 255);
+ *image++ = (uint8_t)hdr->cls->id;
/* Node size (in bytes) */
UINT32ENCODE(image, hdr->node_size);
@@ -818,7 +819,8 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5B2_INT_VERSION;
/* B-tree type */
- *image++ = internal->hdr->cls->id;
+ 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));
/* Serialize records for internal node */
@@ -1219,7 +1221,8 @@ H5B2__cache_leaf_serialize(const H5F_t H5_ATTR_UNUSED *f, void *_image, size_t H
*image++ = H5B2_LEAF_VERSION;
/* B-tree type */
- *image++ = leaf->hdr->cls->id;
+ 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));
/* Serialize records for leaf node */
diff --git a/src/H5B2int.c b/src/H5B2int.c
index b3f855f..9a53176 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -238,7 +238,7 @@ H5B2__split1(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
old_node_nrec = internal->node_ptrs[idx].node_nrec;
/* Determine "middle" record to promote to internal node */
- mid_record = old_node_nrec / 2;
+ mid_record = (uint16_t)(old_node_nrec / 2);
/* Copy "upper half" of records to new child */
HDmemcpy(H5B2_NAT_NREC(right_native, hdr, 0),
@@ -506,8 +506,8 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
if(*left_nrec < *right_nrec) {
/* Moving record from right node to left */
- uint16_t new_right_nrec = (uint16_t)(*left_nrec + *right_nrec) / 2; /* New number of records for right child */
- uint16_t move_nrec = (uint16_t)(*right_nrec - new_right_nrec); /* Number of records to move from right node to left */
+ uint16_t new_right_nrec = (uint16_t)((*left_nrec + *right_nrec) / 2); /* New number of records for right child */
+ uint16_t move_nrec = (uint16_t)(*right_nrec - new_right_nrec); /* Number of records to move from right node to left */
/* Copy record from parent node down into left child */
HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
@@ -557,8 +557,8 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
else {
/* Moving record from left node to right */
- uint16_t new_left_nrec = (uint16_t)(*left_nrec + *right_nrec) / 2; /* New number of records for left child */
- uint16_t move_nrec = (uint16_t)(*left_nrec - new_left_nrec); /* Number of records to move from left node to right */
+ uint16_t new_left_nrec = (uint16_t)((*left_nrec + *right_nrec) / 2); /* New number of records for left child */
+ uint16_t move_nrec = (uint16_t)(*left_nrec - new_left_nrec); /* Number of records to move from left node to right */
/* Sanity check */
HDassert(*left_nrec > *right_nrec);
@@ -761,8 +761,8 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
{
/* Compute new # of records in each node */
unsigned total_nrec = (unsigned)(*left_nrec + *middle_nrec + *right_nrec + 2);
- uint16_t new_middle_nrec = (uint16_t)(total_nrec - 2) / 3;
- uint16_t new_left_nrec = (uint16_t)((total_nrec - 2) - new_middle_nrec) / 2;
+ uint16_t new_middle_nrec = (uint16_t)((total_nrec - 2) / 3);
+ uint16_t new_left_nrec = (uint16_t)(((total_nrec - 2) - new_middle_nrec) / 2);
uint16_t new_right_nrec = (uint16_t)((total_nrec - 2) - (unsigned)(new_left_nrec + new_middle_nrec));
uint16_t curr_middle_nrec = *middle_nrec;
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 5a5f35c..201f52f 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -1654,7 +1654,7 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
if(TRUE == H5S_hyper_intersect_block((H5S_t *)fm->file_space, coords, end)) {
H5S_t *tmp_fchunk; /* Temporary file dataspace */
H5D_chunk_info_t *new_chunk_info; /* chunk information to insert into skip list */
- hssize_t schunk_points; /* Number of elements in chunk selection */
+ hsize_t chunk_points; /* Number of elements in chunk selection */
/* Create "temporary" chunk for selection operations (copy file space) */
if(NULL == (tmp_fchunk = H5S_copy(fm->file_space, TRUE, FALSE)))
@@ -1722,12 +1722,12 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
} /* end if */
/* Get number of elements selected in chunk */
- if((schunk_points = H5S_GET_SELECT_NPOINTS(tmp_fchunk)) < 0)
+ if((chunk_points = H5S_GET_SELECT_NPOINTS(tmp_fchunk)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't get file selection # of elements")
- H5_CHECKED_ASSIGN(new_chunk_info->chunk_points, uint32_t, schunk_points, hssize_t);
+ H5_CHECKED_ASSIGN(new_chunk_info->chunk_points, uint32_t, chunk_points, hsize_t);
/* Decrement # of points left in file selection */
- sel_points -= (hsize_t)schunk_points;
+ sel_points -= chunk_points;
/* Leave if we are done */
if(sel_points == 0)
@@ -5353,9 +5353,8 @@ 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
+ FUNC_ENTER_STATIC_NOERR
/* Compute the index for this chunk */
chunk_index = H5VM_array_offset_pre(rank, udata->common.layout->down_chunks, chunk_rec->scaled);
@@ -5364,7 +5363,7 @@ H5D__chunk_addrmap_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
udata->chunk_addr[chunk_index] = chunk_rec->chunk_addr;
done:
- 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 8138991..60d8863 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -486,7 +486,8 @@ H5EA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5EA_HDR_VERSION;
/* Extensible array type */
- *image++ = hdr->cparam.cls->id;
+ HDassert(hdr->cparam.cls->id <= 255);
+ *image++ = (uint8_t)hdr->cparam.cls->id;
/* General array creation/configuration information */
*image++ = hdr->cparam.raw_elmt_size; /* Element size in file (in bytes) */
@@ -874,7 +875,8 @@ H5EA__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5EA_IBLOCK_VERSION;
/* Extensible array type */
- *image++ = iblock->hdr->cparam.cls->id;
+ 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 */
H5F_addr_encode(f, &image, iblock->hdr->addr);
@@ -1283,7 +1285,8 @@ H5EA__cache_sblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5EA_SBLOCK_VERSION;
/* Extensible array type */
- *image++ = sblock->hdr->cparam.cls->id;
+ 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 */
H5F_addr_encode(f, &image, sblock->hdr->addr);
@@ -1697,7 +1700,8 @@ H5EA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5EA_DBLOCK_VERSION;
/* Extensible array type */
- *image++ = dblock->hdr->cparam.cls->id;
+ 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 */
H5F_addr_encode(f, &image, dblock->hdr->addr);
diff --git a/src/H5FAcache.c b/src/H5FAcache.c
index 1f199e9..5b4e124 100644
--- a/src/H5FAcache.c
+++ b/src/H5FAcache.c
@@ -416,7 +416,8 @@ H5FA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
*image++ = H5FA_HDR_VERSION;
/* Fixed array type */
- *image++ = hdr->cparam.cls->id;
+ HDassert(hdr->cparam.cls->id <= 255);
+ *image++ = (uint8_t)hdr->cparam.cls->id;
/* General array creation/configuration information */
*image++ = hdr->cparam.raw_elmt_size; /* Element size in file (in bytes) */
@@ -804,7 +805,8 @@ H5FA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
*image++ = H5FA_DBLOCK_VERSION;
/* Fixed array type */
- *image++ = dblock->hdr->cparam.cls->id;
+ 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 */
H5F_addr_encode(f, &image, dblock->hdr->addr);
diff --git a/src/H5FScache.c b/src/H5FScache.c
index fa04ba1..551eef1 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -714,7 +714,7 @@ H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t len,
*image++ = H5FS_HDR_VERSION;
/* Client ID */
- *image++ = fspace->client;
+ H5_CHECKED_ASSIGN(*image++, uint8_t, fspace->client, int);
/* Total space tracked */
H5F_ENCODE_LENGTH(f, image, fspace->tot_space);
@@ -1024,8 +1024,8 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t len, void *_udata,
/* Walk through the image, deserializing sections */
do {
- hsize_t sect_size; /* Current section size */
- size_t node_count; /* # of sections of this size */
+ hsize_t sect_size = 0; /* Current section size */
+ size_t node_count = 0; /* # of sections of this size */
size_t u; /* Local index variable */
/* The number of sections of this node's size */
@@ -1039,7 +1039,7 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t len, void *_udata,
/* Loop over nodes of this size */
for(u = 0; u < node_count; u++) {
H5FS_section_info_t *new_sect; /* Section that was deserialized */
- haddr_t sect_addr; /* Address of free space section in the address space */
+ haddr_t sect_addr = 0; /* Address of free space section in the address space */
unsigned sect_type; /* Type of free space section */
unsigned des_flags; /* Flags from deserialize callback */
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 5e78d9e..0819486 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -91,7 +91,7 @@ typedef struct H5F_t H5F_t;
for (_i = 0; _i < sizeof(int64_t); _i++, _n >>= 8) \
*_p++ = (uint8_t)(_n & 0xff); \
for (/*void*/; _i < 8; _i++) \
- *_p++ = (n) < 0 ? 0xff : 0; \
+ *_p++ = (uint8_t)((n) < 0 ? 0xff : 0); \
(p) = (uint8_t*)(p)+8; \
}
diff --git a/src/H5HFtest.c b/src/H5HFtest.c
index 1b1f688..c0ae1f3 100644
--- a/src/H5HFtest.c
+++ b/src/H5HFtest.c
@@ -479,7 +479,7 @@ H5HF_get_id_type_test(const void *_id, unsigned char *obj_type)
HDassert(obj_type);
/* Get the type for a heap ID */
- *obj_type = *id & H5HF_ID_TYPE_MASK;
+ *obj_type = (uint8_t)(*id & H5HF_ID_TYPE_MASK);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5HF_get_id_type_test() */
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index 7f4f17f..23aba09 100644
--- a/src/H5Oainfo.c
+++ b/src/H5Oainfo.c
@@ -194,7 +194,7 @@ H5O_ainfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
*p++ = H5O_AINFO_VERSION;
/* The flags for the attribute indices */
- flags = ainfo->track_corder ? H5O_AINFO_TRACK_CORDER : 0;
+ flags = (unsigned char)(ainfo->track_corder ? H5O_AINFO_TRACK_CORDER : 0);
flags = (unsigned char)(flags | (ainfo->index_corder ? H5O_AINFO_INDEX_CORDER : 0));
*p++ = flags;
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index 1957554..41c467c 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -333,7 +333,7 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
/* The character encoding for the attribute's name, in later versions */
if(attr->shared->version >= H5O_ATTR_VERSION_3)
- *p++ = attr->shared->encoding;
+ *p++ = (uint8_t)attr->shared->encoding;
/* Write the name including null terminator */
HDmemcpy(p, attr->shared->name, name_len);
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index 64d75f4..43285c3 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -406,10 +406,10 @@ H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
if(fill->version < H5O_FILL_VERSION_3) {
/* Space allocation time */
- *p++ = fill->alloc_time;
+ *p++ = (uint8_t)fill->alloc_time;
/* Fill value writing time */
- *p++ = fill->fill_time;
+ *p++ = (uint8_t)fill->fill_time;
/* Whether fill value is defined */
*p++ = (uint8_t)fill->fill_defined;
diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c
index 8c42f46..2492025 100644
--- a/src/H5Ofsinfo.c
+++ b/src/H5Ofsinfo.c
@@ -212,8 +212,8 @@ H5O_fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
HDassert(p);
HDassert(fsinfo);
- *p++ = (uint8_t)fsinfo->version; /* message version */
- *p++ = fsinfo->strategy; /* File space strategy */
+ *p++ = (uint8_t)fsinfo->version; /* message version */
+ *p++ = (uint8_t)fsinfo->strategy; /* File space strategy */
*p++ = (unsigned char)fsinfo->persist; /* Free-space persist or not */
H5F_ENCODE_LENGTH(f, p, fsinfo->threshold); /* Free-space section size threshold */
diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c
index 4b34a52..d6190c6 100644
--- a/src/H5Oginfo.c
+++ b/src/H5Oginfo.c
@@ -171,7 +171,7 @@ static herr_t
H5O_ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *) _mesg;
- unsigned char flags; /* Flags for encoding group info */
+ unsigned char flags = 0; /* Flags for encoding group info */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -183,7 +183,7 @@ H5O_ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
*p++ = H5O_GINFO_VERSION;
/* The flags for the group info */
- flags = ginfo->store_link_phase_change ? H5O_GINFO_STORE_PHASE_CHANGE : 0;
+ flags = (unsigned char)(ginfo->store_link_phase_change ? H5O_GINFO_STORE_PHASE_CHANGE : 0);
flags = (unsigned char)(flags | (ginfo->store_est_entry_info ? H5O_GINFO_STORE_EST_ENTRY_INFO : 0));
*p++ = flags;
diff --git a/src/H5Oint.c b/src/H5Oint.c
index 543637c..39ebfd8 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -240,7 +240,7 @@ H5O_set_version(H5F_t *f, H5O_t *oh, uint8_t oh_flags, hbool_t store_msg_crt_idx
version = H5O_VERSION_1;
/* Upgrade to the version indicated by the file's low bound if higher */
- version = MAX(version, (uint8_t)H5O_obj_ver_bounds[H5F_LOW_BOUND(f)]);
+ version = (uint8_t)MAX(version, (uint8_t)H5O_obj_ver_bounds[H5F_LOW_BOUND(f)]);
/* Version bounds check */
if(version > H5O_obj_ver_bounds[H5F_HIGH_BOUND(f)])
@@ -2368,7 +2368,7 @@ H5O_get_create_plist(const H5O_loc_t *loc, H5P_genplist_t *oc_plist)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set min. # of dense attributes in property list")
/* Mask off non-"user visible" flags */
- ohdr_flags = oh->flags & (H5O_HDR_ATTR_CRT_ORDER_TRACKED | H5O_HDR_ATTR_CRT_ORDER_INDEXED | H5O_HDR_STORE_TIMES);
+ H5_CHECKED_ASSIGN(ohdr_flags, uint8_t, oh->flags & (H5O_HDR_ATTR_CRT_ORDER_TRACKED | H5O_HDR_ATTR_CRT_ORDER_INDEXED | H5O_HDR_STORE_TIMES), int);
/* Set object header flags */
if(H5P_set(oc_plist, H5O_CRT_OHDR_FLAGS_NAME, &ohdr_flags) < 0)
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index ba63a16..56ebb32 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -572,7 +572,7 @@ H5O__layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
H5O_LAYOUT_VERSION_3 : mesg->version);
/* Layout class */
- *p++ = mesg->type;
+ *p++ = (uint8_t)mesg->type;
/* Write out layout class specific information */
switch(mesg->type) {
diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c
index 4903d9f..f96694c 100644
--- a/src/H5Olinfo.c
+++ b/src/H5Olinfo.c
@@ -203,7 +203,7 @@ H5O_linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
*p++ = H5O_LINFO_VERSION;
/* The flags for the link indices */
- index_flags = linfo->track_corder ? H5O_LINFO_TRACK_CORDER : 0;
+ index_flags = (uint8_t)(linfo->track_corder ? H5O_LINFO_TRACK_CORDER : 0);
index_flags = (uint8_t)(index_flags | (linfo->index_corder ? H5O_LINFO_INDEX_CORDER : 0));
*p++ = index_flags;
diff --git a/src/H5Olink.c b/src/H5Olink.c
index 6447936..77ed0c3 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -316,7 +316,7 @@ H5O_link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, con
/* Store the type of a non-default link */
if(link_flags & H5O_LINK_STORE_LINK_TYPE)
- *p++ = lnk->type;
+ *p++ = (uint8_t)lnk->type;
/* Store the link creation order in the file, if its valid */
if(lnk->corder_valid)
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 74fa72e..55a820c 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -257,7 +257,7 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg)
/* Dataspace type */
if(sdim->version > H5O_SDSPACE_VERSION_1)
- *p++ = sdim->type;
+ *p++ = (uint8_t)sdim->type;
else {
*p++ = 0; /*reserved*/
*p++ = 0; /*reserved*/
diff --git a/src/H5SMcache.c b/src/H5SMcache.c
index f0b469a..440d4c4 100644
--- a/src/H5SMcache.c
+++ b/src/H5SMcache.c
@@ -397,7 +397,7 @@ H5SM__cache_table_serialize(const H5F_t *f, void *_image, size_t len,
*image++ = H5SM_LIST_VERSION;
/* Is message index a list or a B-tree? */
- *image++ = table->indexes[u].index_type;
+ *image++ = (uint8_t)table->indexes[u].index_type;
/* Type of messages in the index */
UINT16ENCODE(image, table->indexes[u].mesg_types);
diff --git a/src/H5SMmessage.c b/src/H5SMmessage.c
index ad84b24..af00bc5 100644
--- a/src/H5SMmessage.c
+++ b/src/H5SMmessage.c
@@ -297,7 +297,7 @@ H5SM__message_encode(uint8_t *raw, const void *_nrecord, void *_ctx)
/* Sanity check */
HDassert(ctx);
- *raw++ = message->location;
+ *raw++ = (uint8_t)message->location;
UINT32ENCODE(raw, message->hash);
if(message->location == H5SM_IN_HEAP) {
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index cf9338e..631a8f0 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -239,7 +239,7 @@ H5_DLL herr_t H5S_select_iterate(void *buf, const H5T_t *type, const H5S_t *spac
H5_DLL herr_t H5S_select_fill(const void *fill, size_t fill_size,
const H5S_t *space, void *buf);
H5_DLL htri_t H5S_select_valid(const H5S_t *space);
-H5_DLL hssize_t H5S_get_select_npoints(const H5S_t *space);
+H5_DLL hsize_t H5S_get_select_npoints(const H5S_t *space);
H5_DLL herr_t H5S_get_select_bounds(const H5S_t *space, hsize_t *start, hsize_t *end);
H5_DLL herr_t H5S_get_select_offset(const H5S_t *space, hsize_t *offset);
H5_DLL int H5S_get_select_unlim_dim(const H5S_t *space);
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 3ab4d28..0b3d0fa 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -336,7 +336,7 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-hssize_t
+hsize_t
H5S_get_select_npoints(const H5S_t *space)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -344,7 +344,7 @@ H5S_get_select_npoints(const H5S_t *space)
/* Check args */
HDassert(space);
- FUNC_LEAVE_NOAPI((hssize_t)space->select.num_elem)
+ FUNC_LEAVE_NOAPI(space->select.num_elem)
} /* H5S_get_select_npoints() */
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index df6d2c3..c6c1777 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -363,7 +363,7 @@ H5T__bit_set(uint8_t *buf, size_t offset, size_t size, hbool_t value)
/* The middle bytes */
while (size >= 8) {
- buf[idx++] = value ? 0xff : 0x00;
+ buf[idx++] = (uint8_t)(value ? 0xff : 0x00);
size -= 8;
}
@@ -532,7 +532,7 @@ H5T__bit_inc(uint8_t *buf, size_t start, size_t size)
acc = buf[idx];
acc++;
carry = acc & 0x100;
- buf[idx] = acc & 0xff;
+ buf[idx] = (uint8_t)(acc & 0xff);
idx++;
size -= 8;
}
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index f8fc325..a7c3faf 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -324,7 +324,7 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
#define H5Z_XFORM_DO_OP5(TYPE, SIZE) \
{ \
- TYPE val = ((tree->type == H5Z_XFORM_INTEGER) ? (TYPE)tree->value.int_val : (TYPE)tree->value.float_val); \
+ TYPE val = (TYPE)((tree->type == H5Z_XFORM_INTEGER) ? tree->value.int_val : tree->value.float_val); \
H5VM_array_fill(array, &val, sizeof(TYPE), (SIZE)); \
}