diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5B2int.c | 14 | ||||
-rw-r--r-- | src/H5Dchunk.c | 6 | ||||
-rw-r--r-- | src/H5FScache.c | 6 | ||||
-rw-r--r-- | src/H5HFtest.c | 2 | ||||
-rw-r--r-- | src/H5Oainfo.c | 2 | ||||
-rw-r--r-- | src/H5Oattr.c | 2 | ||||
-rw-r--r-- | src/H5Ofill.c | 4 | ||||
-rw-r--r-- | src/H5Oginfo.c | 4 | ||||
-rw-r--r-- | src/H5Olayout.c | 2 | ||||
-rw-r--r-- | src/H5Olinfo.c | 2 | ||||
-rw-r--r-- | src/H5Olink.c | 2 | ||||
-rw-r--r-- | src/H5Osdspace.c | 2 | ||||
-rw-r--r-- | src/H5SMmessage.c | 2 | ||||
-rw-r--r-- | src/H5Sprivate.h | 2 | ||||
-rw-r--r-- | src/H5Ztrans.c | 2 |
15 files changed, 26 insertions, 28 deletions
diff --git a/src/H5B2int.c b/src/H5B2int.c index 93e737e..518a41f 100644 --- a/src/H5B2int.c +++ b/src/H5B2int.c @@ -265,7 +265,7 @@ H5B2_split1(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, 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), @@ -525,8 +525,8 @@ H5B2_redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, 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); @@ -571,8 +571,8 @@ H5B2_redistribute2(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, 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 */ /* Slide records in right node up */ HDmemmove(H5B2_NAT_NREC(right_native, hdr, move_nrec), @@ -765,8 +765,8 @@ H5B2_redistribute3(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, { /* 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 c9dfe87..a94dea5 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -4562,9 +4562,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 */ if(H5VM_chunk_index(rank, chunk_rec->offset, udata->common.layout->dim, udata->common.layout->down_chunks, &chunk_index) < 0) @@ -4573,8 +4572,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; -done: - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI(H5_ITER_CONT) } /* H5D__chunk_addrmap_cb() */ diff --git a/src/H5FScache.c b/src/H5FScache.c index fdf4e4d..e3fd237 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -631,8 +631,8 @@ H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void /* Walk through the buffer, 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 */ @@ -646,7 +646,7 @@ H5FS_cache_sinfo_load(H5F_t *f, hid_t dxpl_id, haddr_t H5_ATTR_UNUSED addr, void /* 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/H5HFtest.c b/src/H5HFtest.c index 27f4d10..20bdc50 100644 --- a/src/H5HFtest.c +++ b/src/H5HFtest.c @@ -478,7 +478,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 5aab4c6..48e6978 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 c2c0fe3..4d703f6 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -315,7 +315,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 159f730..eee6cd2 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -374,10 +374,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/H5Oginfo.c b/src/H5Oginfo.c index 8ba1f71..fedab8c 100644 --- a/src/H5Oginfo.c +++ b/src/H5Oginfo.c @@ -170,7 +170,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 @@ -182,7 +182,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/H5Olayout.c b/src/H5Olayout.c index 131b4bf..185dca1 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -307,7 +307,7 @@ H5O_layout_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c *p++ = (uint8_t)H5O_LAYOUT_VERSION_3; /* 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 a612ae5..adda4ea 100644 --- a/src/H5Olinfo.c +++ b/src/H5Olinfo.c @@ -204,7 +204,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 c0dd1d8..0a74381 100644 --- a/src/H5Olink.c +++ b/src/H5Olink.c @@ -315,7 +315,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 627ea19..e633a30 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -258,7 +258,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/H5SMmessage.c b/src/H5SMmessage.c index 979adfa..f342e28 100644 --- a/src/H5SMmessage.c +++ b/src/H5SMmessage.c @@ -301,7 +301,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 a509bee..49d5c92 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -235,7 +235,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 herr_t H5S_select_offset(H5S_t *space, const hssize_t *offset); diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c index bffb41b..c4a16e1 100644 --- a/src/H5Ztrans.c +++ b/src/H5Ztrans.c @@ -260,7 +260,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)); \ } |