diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-01-18 13:17:33 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-01-18 13:17:33 (GMT) |
commit | 04f2fe8ff8ca098a88d769deaa5b663a629ddecc (patch) | |
tree | 2bf5d9a5734c1aa7f9bd7bd414e5e0c5411bc8fd /src | |
parent | 628c3cd5040ba5df24f945494ea5c9ac81bd7692 (diff) | |
download | hdf5-04f2fe8ff8ca098a88d769deaa5b663a629ddecc.zip hdf5-04f2fe8ff8ca098a88d769deaa5b663a629ddecc.tar.gz hdf5-04f2fe8ff8ca098a88d769deaa5b663a629ddecc.tar.bz2 |
[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
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Gnode.c | 2 | ||||
-rw-r--r-- | src/H5RS.c | 2 | ||||
-rw-r--r-- | src/H5RSprivate.h | 2 | ||||
-rw-r--r-- | src/H5Shyper.c | 11 | ||||
-rw-r--r-- | src/H5Tconv.c | 2 |
5 files changed, 10 insertions, 9 deletions
diff --git a/src/H5Gnode.c b/src/H5Gnode.c index c32c46b..c07b8d6 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -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 */ diff --git a/src/H5RSprivate.h b/src/H5RSprivate.h index 086396f..a473af0 100644 --- a/src/H5RSprivate.h +++ b/src/H5RSprivate.h @@ -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); diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 4ed0b2d..87f282e 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -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); diff --git a/src/H5Tconv.c b/src/H5Tconv.c index affa795..b855d88 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -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"); } |