mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[svn-r6301] Purpose:
Code cleanup & bug fix Description: Cleanup another set of warnings on Windows and also fix mis-placed assertion that caused the daily tests to fail. Platforms tested: IRIX64 6.5 (modi4) w/-n32
This commit is contained in:
parent
628c3cd504
commit
04f2fe8ff8
@ -1106,7 +1106,7 @@ H5G_node_iterate (H5F_t *f, void UNUSED *_lt_key, haddr_t addr,
|
||||
s = buf;
|
||||
}
|
||||
HDstrcpy (s, name);
|
||||
ret_value = (bt_udata->op)(bt_udata->group_id, s,
|
||||
ret_value = (H5B_iterate_t)(bt_udata->op)(bt_udata->group_id, s,
|
||||
bt_udata->op_data);
|
||||
if (s!=buf)
|
||||
H5MM_xfree (s);
|
||||
|
@ -132,7 +132,7 @@ done:
|
||||
REVISION LOG
|
||||
--------------------------------------------------------------------------*/
|
||||
H5RS_str_t *
|
||||
H5RS_wrap(char *s)
|
||||
H5RS_wrap(const char *s)
|
||||
{
|
||||
H5RS_str_t *ret_value=NULL; /* Return value */
|
||||
|
||||
|
@ -40,7 +40,7 @@ typedef struct {
|
||||
|
||||
/* Private routines */
|
||||
H5_DLL H5RS_str_t *H5RS_create(const char *s);
|
||||
H5_DLL H5RS_str_t *H5RS_wrap(char *s);
|
||||
H5_DLL H5RS_str_t *H5RS_wrap(const char *s);
|
||||
H5_DLL H5RS_str_t *H5RS_own(char *s);
|
||||
H5_DLL herr_t H5RS_decr(H5RS_str_t *rs);
|
||||
H5_DLL herr_t H5RS_incr(H5RS_str_t *rs);
|
||||
|
@ -5564,11 +5564,12 @@ H5S_hyper_get_seq_list_opt(const H5S_t *space,H5S_sel_iter_t *iter,
|
||||
size_t leftover; /* The number of elements left over from the last sequence */
|
||||
|
||||
/* Calculate the number of elements left in the sequence */
|
||||
H5_CHECK_OVERFLOW( tdiminfo[fast_dim].block-(iter->hyp.off[fast_dim]-tdiminfo[fast_dim].start) ,hsize_t,size_t);
|
||||
if(tdiminfo[fast_dim].stride==1)
|
||||
leftover=(size_t)(tdiminfo[fast_dim].block-(iter->hyp.off[fast_dim]-tdiminfo[fast_dim].start));
|
||||
else
|
||||
leftover=(size_t)(tdiminfo[fast_dim].block-((iter->hyp.off[fast_dim]-tdiminfo[fast_dim].start)%tdiminfo[fast_dim].stride));
|
||||
if(tdiminfo[fast_dim].stride==1) {
|
||||
H5_ASSIGN_OVERFLOW(leftover, tdiminfo[fast_dim].block-(iter->hyp.off[fast_dim]-tdiminfo[fast_dim].start) ,hsize_t,size_t);
|
||||
} /* end if */
|
||||
else {
|
||||
H5_ASSIGN_OVERFLOW(leftover, tdiminfo[fast_dim].block-((iter->hyp.off[fast_dim]-tdiminfo[fast_dim].start)%tdiminfo[fast_dim].stride) ,hsize_t,size_t);
|
||||
} /* end else */
|
||||
|
||||
/* Make certain that we don't write too many */
|
||||
actual_elem=MIN(leftover,io_left);
|
||||
|
@ -2274,7 +2274,7 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
|
||||
if(bg_seq_len>0) {
|
||||
H5_CHECK_OVERFLOW( bg_seq_len*MAX(src_base_size,dst_base_size) ,hsize_t,size_t);
|
||||
if(tmp_buf_size<(size_t)(bg_seq_len*MAX(src_base_size, dst_base_size))) {
|
||||
tmp_buf_size=bg_seq_len*MAX(src_base_size, dst_base_size);
|
||||
tmp_buf_size=(size_t)(bg_seq_len*MAX(src_base_size, dst_base_size));
|
||||
if((tmp_buf=H5FL_BLK_REALLOC(vlen_seq,tmp_buf, tmp_buf_size))==NULL)
|
||||
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion");
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ main (int argc, char *argv[])
|
||||
n = blk_size;
|
||||
if (dst_is_family) n = (size_t)MIN((off_t)n, dst_size-dst_offset);
|
||||
if (left_overs) {
|
||||
n = MIN (n, left_overs);
|
||||
n = (size_t)MIN (n, left_overs);
|
||||
left_overs -= n;
|
||||
need_write = FALSE;
|
||||
} else if (src_offset<src_act_size) {
|
||||
|
Loading…
Reference in New Issue
Block a user