diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-06-14 19:32:02 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-06-14 19:32:02 (GMT) |
commit | ef01629bb29800c8837a261b85897570e4c092c1 (patch) | |
tree | d83127b519689f70929ac4feec2b3716d06addcd | |
parent | f5a192ff0d3d8f4279b356ff54b1a2e78e22c8ec (diff) | |
download | hdf5-ef01629bb29800c8837a261b85897570e4c092c1.zip hdf5-ef01629bb29800c8837a261b85897570e4c092c1.tar.gz hdf5-ef01629bb29800c8837a261b85897570e4c092c1.tar.bz2 |
[svn-r8683] Purpose:
Code optimization
Description:
Use 'size_t' instead of 'hsize_t' to track the number of elements in
memory buffers, especially for type conversion.
Platforms tested:
Solaris 2.7 (arabica)
FreeBSD 4.10 (sleipnir) w/parallel
Too minor to require h5committest
-rw-r--r-- | src/H5A.c | 23 | ||||
-rw-r--r-- | src/H5Dio.c | 30 | ||||
-rw-r--r-- | src/H5FDmulti.c | 7 | ||||
-rw-r--r-- | src/H5Ofill.c | 2 | ||||
-rw-r--r-- | src/H5Pdcpl.c | 2 | ||||
-rw-r--r-- | src/H5Sprivate.h | 12 | ||||
-rw-r--r-- | src/H5Sselect.c | 56 | ||||
-rw-r--r-- | src/H5T.c | 25 | ||||
-rw-r--r-- | src/H5Tconv.c | 391 | ||||
-rw-r--r-- | src/H5Tnative.c | 2 | ||||
-rw-r--r-- | src/H5Tpkg.h | 378 | ||||
-rw-r--r-- | src/H5Tprivate.h | 2 | ||||
-rw-r--r-- | src/H5Tpublic.h | 4 | ||||
-rw-r--r-- | src/H5Tvlen.c | 48 | ||||
-rw-r--r-- | src/H5Zprivate.h | 2 | ||||
-rw-r--r-- | src/H5Ztrans.c | 12 | ||||
-rw-r--r-- | test/dtypes.c | 127 |
17 files changed, 545 insertions, 578 deletions
@@ -613,7 +613,7 @@ H5A_write(H5A_t *attr, const H5T_t *mem_type, const void *buf, hid_t dxpl_id) uint8_t *tconv_buf = NULL; /* data type conv buffer */ uint8_t *bkg_buf = NULL; /* temp conversion buffer */ hssize_t snelmts; /* elements in attribute */ - hsize_t nelmts; /* elements in attribute */ + size_t nelmts; /* elements in attribute */ H5T_path_t *tpath = NULL; /* conversion information*/ hid_t src_id = -1, dst_id = -1;/* temporary type atoms */ size_t src_type_size; /* size of source type */ @@ -631,7 +631,7 @@ H5A_write(H5A_t *attr, const H5T_t *mem_type, const void *buf, hid_t dxpl_id) /* Create buffer for data to store on disk */ if((snelmts=H5S_GET_EXTENT_NPOINTS(attr->ds))<0) HGOTO_ERROR (H5E_ATTR, H5E_CANTCOUNT, FAIL, "dataspace is invalid") - nelmts=(hsize_t)snelmts; + H5_ASSIGN_OVERFLOW(nelmts,snelmts,hssize_t,size_t); /* Check for null dataspace */ if(nelmts>0) { @@ -640,13 +640,12 @@ H5A_write(H5A_t *attr, const H5T_t *mem_type, const void *buf, hid_t dxpl_id) dst_type_size = H5T_get_size(attr->dt); /* Get the maximum buffer size needed and allocate it */ - H5_ASSIGN_OVERFLOW(buf_size,nelmts*MAX(src_type_size,dst_type_size),hsize_t,size_t); + buf_size=nelmts*MAX(src_type_size,dst_type_size); if (NULL==(tconv_buf = H5MM_malloc (buf_size)) || NULL==(bkg_buf = H5MM_calloc(buf_size))) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") /* Copy the user's data into the buffer for conversion */ - H5_CHECK_OVERFLOW((src_type_size*nelmts),hsize_t,size_t); - HDmemcpy(tconv_buf,buf,(size_t)(src_type_size*nelmts)); + HDmemcpy(tconv_buf,buf,(src_type_size*nelmts)); /* Convert memory buffer into disk buffer */ /* Set up type conversion function */ @@ -763,7 +762,7 @@ H5A_read(const H5A_t *attr, const H5T_t *mem_type, void *buf, hid_t dxpl_id) uint8_t *tconv_buf = NULL; /* data type conv buffer*/ uint8_t *bkg_buf = NULL; /* background buffer */ hssize_t snelmts; /* elements in attribute */ - hsize_t nelmts; /* elements in attribute*/ + size_t nelmts; /* elements in attribute*/ H5T_path_t *tpath = NULL; /* type conversion info */ hid_t src_id = -1, dst_id = -1;/* temporary type atoms*/ size_t src_type_size; /* size of source type */ @@ -780,7 +779,7 @@ H5A_read(const H5A_t *attr, const H5T_t *mem_type, void *buf, hid_t dxpl_id) /* Create buffer for data to store on disk */ if((snelmts=H5S_GET_EXTENT_NPOINTS(attr->ds))<0) HGOTO_ERROR (H5E_ATTR, H5E_CANTCOUNT, FAIL, "dataspace is invalid") - nelmts=(hsize_t)snelmts; + H5_ASSIGN_OVERFLOW(nelmts,snelmts,hssize_t,size_t); /* Check for null dataspace */ if(nelmts>0) { @@ -789,19 +788,17 @@ H5A_read(const H5A_t *attr, const H5T_t *mem_type, void *buf, hid_t dxpl_id) dst_type_size = H5T_get_size(mem_type); /* Check if the attribute has any data yet, if not, fill with zeroes */ - H5_CHECK_OVERFLOW((dst_type_size*nelmts),hsize_t,size_t); if(attr->ent_opened && !attr->initialized) { - HDmemset(buf,0,(size_t)(dst_type_size*nelmts)); + HDmemset(buf,0,(dst_type_size*nelmts)); } /* end if */ else { /* Attribute exists and has a value */ /* Get the maximum buffer size needed and allocate it */ - H5_ASSIGN_OVERFLOW(buf_size,(nelmts*MAX(src_type_size,dst_type_size)),hsize_t,size_t); + buf_size=nelmts*MAX(src_type_size,dst_type_size); if (NULL==(tconv_buf = H5MM_malloc (buf_size)) || NULL==(bkg_buf = H5MM_calloc(buf_size))) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") /* Copy the attribute data into the buffer for conversion */ - H5_CHECK_OVERFLOW((src_type_size*nelmts),hsize_t,size_t); - HDmemcpy(tconv_buf,attr->data,(size_t)(src_type_size*nelmts)); + HDmemcpy(tconv_buf,attr->data,(src_type_size*nelmts)); /* Convert memory buffer into disk buffer */ /* Set up type conversion function */ @@ -818,7 +815,7 @@ H5A_read(const H5A_t *attr, const H5T_t *mem_type, void *buf, hid_t dxpl_id) HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "data type conversion failed") /* Copy the converted data into the user's buffer */ - HDmemcpy(buf,tconv_buf,(size_t)(dst_type_size*nelmts)); + HDmemcpy(buf,tconv_buf,(dst_type_size*nelmts)); } /* end else */ } /* end if */ diff --git a/src/H5Dio.c b/src/H5Dio.c index a7686ed..389cfef 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -256,7 +256,7 @@ H5D_fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_t HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion") /* Perform data type conversion */ - if (H5T_convert(tpath, src_id, dst_id, (hsize_t)1, 0, 0, tconv_buf, bkg_buf, dxpl_id)<0) + if (H5T_convert(tpath, src_id, dst_id, 1, 0, 0, tconv_buf, bkg_buf, dxpl_id)<0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed") } /* end if */ } /* end if */ @@ -1057,7 +1057,7 @@ H5D_contig_read(hsize_t nelmts, H5D_t *dataset, size_t dst_type_size; /*size of destination type*/ size_t max_type_size; /* Size of largest source/destination type */ size_t target_size; /*desired buffer size */ - hsize_t request_nelmts; /*requested strip mine */ + size_t request_nelmts; /*requested strip mine */ H5S_sel_iter_t mem_iter; /*memory selection iteration info*/ hbool_t mem_iter_init=0; /*memory selection iteration info has been initialized */ H5S_sel_iter_t bkg_iter; /*background iteration info*/ @@ -1068,7 +1068,7 @@ H5D_contig_read(hsize_t nelmts, H5D_t *dataset, uint8_t *tconv_buf = NULL; /*data type conv buffer */ uint8_t *bkg_buf = NULL; /*background buffer */ hsize_t smine_start; /*strip mine start loc */ - hsize_t n, smine_nelmts; /*elements per strip */ + size_t n, smine_nelmts; /*elements per strip */ herr_t ret_value = SUCCEED; /*return value */ FUNC_ENTER_NOAPI_NOINIT(H5D_contig_read) @@ -1171,8 +1171,7 @@ H5D_contig_read(hsize_t nelmts, H5D_t *dataset, } /* end if */ if (need_bkg && NULL==(bkg_buf=dxpl_cache->bkgr_buf)) { /* Allocate background buffer */ - H5_CHECK_OVERFLOW((request_nelmts*dst_type_size),hsize_t,size_t); - if((bkg_buf=H5FL_BLK_CALLOC(type_conv,(size_t)(request_nelmts*dst_type_size)))==NULL) + if((bkg_buf=H5FL_BLK_CALLOC(type_conv,(request_nelmts*dst_type_size)))==NULL) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for background conversion") } /* end if */ @@ -1309,7 +1308,7 @@ H5D_contig_write(hsize_t nelmts, H5D_t *dataset, size_t dst_type_size; /*size of destination type*/ size_t max_type_size; /* Size of largest source/destination type */ size_t target_size; /*desired buffer size */ - hsize_t request_nelmts; /*requested strip mine */ + size_t request_nelmts; /*requested strip mine */ H5S_sel_iter_t mem_iter; /*memory selection iteration info*/ hbool_t mem_iter_init=0; /*memory selection iteration info has been initialized */ H5S_sel_iter_t bkg_iter; /*background iteration info*/ @@ -1320,7 +1319,7 @@ H5D_contig_write(hsize_t nelmts, H5D_t *dataset, uint8_t *tconv_buf = NULL; /*data type conv buffer */ uint8_t *bkg_buf = NULL; /*background buffer */ hsize_t smine_start; /*strip mine start loc */ - hsize_t n, smine_nelmts; /*elements per strip */ + size_t n, smine_nelmts; /*elements per strip */ herr_t ret_value = SUCCEED; /*return value */ FUNC_ENTER_NOAPI_NOINIT(H5D_contig_write) @@ -1421,8 +1420,7 @@ H5D_contig_write(hsize_t nelmts, H5D_t *dataset, } /* end if */ if (need_bkg && NULL==(bkg_buf=dxpl_cache->bkgr_buf)) { /* Allocate background buffer */ - H5_CHECK_OVERFLOW((request_nelmts*dst_type_size),hsize_t,size_t); - if((bkg_buf=H5FL_BLK_CALLOC(type_conv,(size_t)(request_nelmts*dst_type_size)))==NULL) + if((bkg_buf=H5FL_BLK_CALLOC(type_conv,(request_nelmts*dst_type_size)))==NULL) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for background conversion") } /* end if */ @@ -1557,9 +1555,9 @@ H5D_chunk_read(hsize_t nelmts, H5D_t *dataset, size_t dst_type_size; /*size of destination type*/ size_t max_type_size; /* Size of largest source/destination type */ size_t target_size; /*desired buffer size */ - hsize_t request_nelmts; /*requested strip mine */ + size_t request_nelmts; /*requested strip mine */ hsize_t smine_start; /*strip mine start loc */ - hsize_t n, smine_nelmts; /*elements per strip */ + size_t n, smine_nelmts; /*elements per strip */ H5S_sel_iter_t mem_iter; /*memory selection iteration info*/ hbool_t mem_iter_init=0; /*memory selection iteration info has been initialized */ H5S_sel_iter_t bkg_iter; /*background iteration info*/ @@ -1683,8 +1681,7 @@ H5D_chunk_read(hsize_t nelmts, H5D_t *dataset, } /* end if */ if (need_bkg && NULL==(bkg_buf=dxpl_cache->bkgr_buf)) { /* Allocate background buffer */ - H5_CHECK_OVERFLOW((request_nelmts*dst_type_size),hsize_t,size_t); - if((bkg_buf=H5FL_BLK_CALLOC(type_conv,(size_t)(request_nelmts*dst_type_size)))==NULL) + if((bkg_buf=H5FL_BLK_CALLOC(type_conv,(request_nelmts*dst_type_size)))==NULL) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for background conversion") } /* end if */ @@ -1873,9 +1870,9 @@ H5D_chunk_write(hsize_t nelmts, H5D_t *dataset, size_t dst_type_size; /*size of destination type*/ size_t max_type_size; /* Size of largest source/destination type */ size_t target_size; /*desired buffer size */ - hsize_t request_nelmts; /*requested strip mine */ + size_t request_nelmts; /*requested strip mine */ hsize_t smine_start; /*strip mine start loc */ - hsize_t n, smine_nelmts; /*elements per strip */ + size_t n, smine_nelmts; /*elements per strip */ H5S_sel_iter_t mem_iter; /*memory selection iteration info*/ hbool_t mem_iter_init=0; /*memory selection iteration info has been initialized */ H5S_sel_iter_t bkg_iter; /*background iteration info*/ @@ -2041,8 +2038,7 @@ H5D_chunk_write(hsize_t nelmts, H5D_t *dataset, } /* end if */ if (need_bkg && NULL==(bkg_buf=dxpl_cache->bkgr_buf)) { /* Allocate background buffer */ - H5_CHECK_OVERFLOW((request_nelmts*dst_type_size),hsize_t,size_t); - if((bkg_buf=H5FL_BLK_CALLOC(type_conv,(size_t)(request_nelmts*dst_type_size)))==NULL) + if((bkg_buf=H5FL_BLK_CALLOC(type_conv,(request_nelmts*dst_type_size)))==NULL) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for background conversion") } /* end if */ diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index b0c5ea2..f863b55 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -791,7 +791,7 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/, H5FD_multi_t *file = (H5FD_multi_t*)_file; haddr_t memb_eoa; unsigned char *p; - hsize_t nseen; + size_t nseen; size_t i; H5FD_mem_t m; static const char *func="H5FD_multi_sb_encode"; /* Function Name for error reporting */ @@ -875,7 +875,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) char x[2*H5FD_MEM_NTYPES*8]; H5FD_mem_t map[H5FD_MEM_NTYPES]; int i; - hsize_t nseen=0; + size_t nseen=0; hbool_t map_changed=FALSE; hbool_t in_use[H5FD_MEM_NTYPES]; const char *memb_name[H5FD_MEM_NTYPES]; @@ -918,8 +918,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) /* Decode Address and EOA values */ assert(sizeof(haddr_t)<=8); - assert((nseen*2*8)==(hsize_t)((size_t)(nseen*2*8))); /*check for overflow*/ - memcpy(x, buf, (size_t)(nseen*2*8)); + memcpy(x, buf, (nseen*2*8)); buf += nseen*2*8; if (H5Tconvert(H5T_STD_U64LE, H5T_NATIVE_HADDR, nseen*2, x, NULL, H5P_DEFAULT)<0) H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1) diff --git a/src/H5Ofill.c b/src/H5Ofill.c index 1870f85..ffe42a8 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -903,7 +903,7 @@ H5O_fill_convert(void *_fill, H5T_t *dset_type, hid_t dxpl_id) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion"); /* Do the conversion */ - if (H5T_convert(tpath, src_id, dst_id, (hsize_t)1, 0, 0, buf, bkg, dxpl_id)<0) + if (H5T_convert(tpath, src_id, dst_id, 1, 0, 0, buf, bkg, dxpl_id)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "data type conversion failed"); /* Update the fill message */ diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 604c6b4..edf386e 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1333,7 +1333,7 @@ H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value/*out*/) HDmemcpy(buf, fill.buf, H5T_get_size(fill.type)); /* Do the conversion */ - if (H5T_convert(tpath, src_id, type_id, (hsize_t)1, 0, 0, buf, bkg, H5AC_dxpl_id)<0) + if (H5T_convert(tpath, src_id, type_id, 1, 0, 0, buf, bkg, H5AC_dxpl_id)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "data type conversion failed"); if (buf!=value) HDmemcpy(value, buf, H5T_get_size(type)); diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 5dbb467..634b5df 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -235,17 +235,17 @@ H5_DLL herr_t H5S_select_fill(void *fill, size_t fill_size, const H5S_t *space, void *buf); H5_DLL herr_t H5S_select_fscat (H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, H5D_t *dset, const H5D_storage_t *store, - const H5S_t *file_space, H5S_sel_iter_t *file_iter, hsize_t nelmts, + const H5S_t *file_space, H5S_sel_iter_t *file_iter, size_t nelmts, const void *_buf); -H5_DLL hsize_t H5S_select_fgath (H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, +H5_DLL size_t H5S_select_fgath (H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, H5D_t *dset, const H5D_storage_t *store, - const H5S_t *file_space, H5S_sel_iter_t *file_iter, hsize_t nelmts, + const H5S_t *file_space, H5S_sel_iter_t *file_iter, size_t nelmts, void *buf); H5_DLL herr_t H5S_select_mscat (const void *_tscat_buf, - const H5S_t *space, H5S_sel_iter_t *iter, hsize_t nelmts, + const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts, const H5D_dxpl_cache_t *dxpl_cache, void *_buf/*out*/); -H5_DLL hsize_t H5S_select_mgath (const void *_buf, - const H5S_t *space, H5S_sel_iter_t *iter, hsize_t nelmts, +H5_DLL size_t H5S_select_mgath (const void *_buf, + const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts, const H5D_dxpl_cache_t *dxpl_cache, void *_tgath_buf/*out*/); H5_DLL herr_t H5S_select_read(H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, H5D_t *dset, const H5D_storage_t *store, diff --git a/src/H5Sselect.c b/src/H5Sselect.c index d46e8df..dc2aed0 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -1627,7 +1627,7 @@ done: herr_t H5S_select_fscat (H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, H5D_t *dset, const H5D_storage_t *store, - const H5S_t *space, H5S_sel_iter_t *iter, hsize_t nelmts, + const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts, const void *_buf) { const uint8_t *buf=_buf; /* Alias for pointer arithmetic */ @@ -1639,7 +1639,6 @@ H5S_select_fscat (H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, size_t _len[H5D_XFER_HYPER_VECTOR_SIZE_DEF]; /* Array to store sequence lengths */ size_t *len=NULL; /* Array to store sequence lengths */ size_t orig_mem_len, mem_len; /* Length of sequence in memory */ - size_t maxelem; /* Number of elements in the buffer */ size_t nseq; /* Number of sequences generated */ size_t nelem; /* Number of elements used in sequences */ herr_t ret_value=SUCCEED; /* Return value */ @@ -1668,13 +1667,10 @@ H5S_select_fscat (H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, off=_off; } /* end else */ - /* Compute the number of bytes available in buffer */ - H5_ASSIGN_OVERFLOW(maxelem,nelmts,hsize_t,size_t); - /* Loop until all elements are written */ - while(maxelem>0) { + while(nelmts>0) { /* Get list of sequences for selection to write */ - if(H5S_SELECT_GET_SEQ_LIST(space,H5S_GET_SEQ_LIST_SORTED,iter,dxpl_cache->vec_size,maxelem,&nseq,&nelem,off,len)<0) + if(H5S_SELECT_GET_SEQ_LIST(space,H5S_GET_SEQ_LIST_SORTED,iter,dxpl_cache->vec_size,nelmts,&nseq,&nelem,off,len)<0) HGOTO_ERROR (H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed"); /* Reset the current sequence information */ @@ -1690,7 +1686,7 @@ H5S_select_fscat (H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, buf += orig_mem_len; /* Decrement number of elements left to process */ - maxelem -= nelem; + nelmts -= nelem; } /* end while */ done: @@ -1727,10 +1723,10 @@ done: * *------------------------------------------------------------------------- */ -hsize_t +size_t H5S_select_fgath (H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, H5D_t *dset, const H5D_storage_t *store, - const H5S_t *space, H5S_sel_iter_t *iter, hsize_t nelmts, + const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts, void *_buf/*out*/) { uint8_t *buf=_buf; /* Alias for pointer arithmetic */ @@ -1742,10 +1738,9 @@ H5S_select_fgath (H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, size_t _len[H5D_XFER_HYPER_VECTOR_SIZE_DEF]; /* Array to store sequence lengths */ size_t *len=NULL; /* Pointer to sequence lengths */ size_t orig_mem_len, mem_len; /* Length of sequence in memory */ - size_t maxelem; /* Number of elements in the buffer */ size_t nseq; /* Number of sequences generated */ size_t nelem; /* Number of elements used in sequences */ - hsize_t ret_value=nelmts; /* Return value */ + size_t ret_value=nelmts; /* Return value */ FUNC_ENTER_NOAPI(H5S_select_fgath, 0); @@ -1770,13 +1765,10 @@ H5S_select_fgath (H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, off=_off; } /* end else */ - /* Compute the number of elements available in buffer */ - H5_ASSIGN_OVERFLOW(maxelem,nelmts,hsize_t,size_t); - /* Loop until all elements are written */ - while(maxelem>0) { + while(nelmts>0) { /* Get list of sequences for selection to write */ - if(H5S_SELECT_GET_SEQ_LIST(space,H5S_GET_SEQ_LIST_SORTED,iter,dxpl_cache->vec_size,maxelem,&nseq,&nelem,off,len)<0) + if(H5S_SELECT_GET_SEQ_LIST(space,H5S_GET_SEQ_LIST_SORTED,iter,dxpl_cache->vec_size,nelmts,&nseq,&nelem,off,len)<0) HGOTO_ERROR (H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed"); /* Reset the current sequence information */ @@ -1792,7 +1784,7 @@ H5S_select_fgath (H5F_t *f, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, buf += orig_mem_len; /* Decrement number of elements left to process */ - maxelem -= nelem; + nelmts -= nelem; } /* end while */ done: @@ -1825,7 +1817,7 @@ done: */ herr_t H5S_select_mscat (const void *_tscat_buf, const H5S_t *space, - H5S_sel_iter_t *iter, hsize_t nelmts, const H5D_dxpl_cache_t *dxpl_cache, + H5S_sel_iter_t *iter, size_t nelmts, const H5D_dxpl_cache_t *dxpl_cache, void *_buf/*out*/) { uint8_t *buf=(uint8_t *)_buf; /* Get local copies for address arithmetic */ @@ -1835,7 +1827,6 @@ H5S_select_mscat (const void *_tscat_buf, const H5S_t *space, size_t _len[H5D_XFER_HYPER_VECTOR_SIZE_DEF]; /* Array to store sequence lengths */ size_t *len=NULL; /* Pointer to sequence lengths */ size_t curr_len; /* Length of bytes left to process in sequence */ - size_t maxelem; /* Number of elements in the buffer */ size_t nseq; /* Number of sequences generated */ size_t curr_seq; /* Current sequence being processed */ size_t nelem; /* Number of elements used in sequences */ @@ -1862,13 +1853,10 @@ H5S_select_mscat (const void *_tscat_buf, const H5S_t *space, off=_off; } /* end else */ - /* Compute the number of elements available in buffer */ - H5_ASSIGN_OVERFLOW(maxelem,nelmts,hsize_t,size_t); - /* Loop until all elements are written */ - while(maxelem>0) { + while(nelmts>0) { /* Get list of sequences for selection to write */ - if(H5S_SELECT_GET_SEQ_LIST(space,0,iter,dxpl_cache->vec_size,maxelem,&nseq,&nelem,off,len)<0) + if(H5S_SELECT_GET_SEQ_LIST(space,0,iter,dxpl_cache->vec_size,nelmts,&nseq,&nelem,off,len)<0) HGOTO_ERROR (H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed"); /* Loop, while sequences left to process */ @@ -1883,7 +1871,7 @@ H5S_select_mscat (const void *_tscat_buf, const H5S_t *space, } /* end for */ /* Decrement number of elements left to process */ - maxelem -= nelem; + nelmts -= nelem; } /* end while */ done: @@ -1916,9 +1904,9 @@ done: * *------------------------------------------------------------------------- */ -hsize_t +size_t H5S_select_mgath (const void *_buf, const H5S_t *space, - H5S_sel_iter_t *iter, hsize_t nelmts, const H5D_dxpl_cache_t *dxpl_cache, + H5S_sel_iter_t *iter, size_t nelmts, const H5D_dxpl_cache_t *dxpl_cache, void *_tgath_buf/*out*/) { const uint8_t *buf=(const uint8_t *)_buf; /* Get local copies for address arithmetic */ @@ -1928,11 +1916,10 @@ H5S_select_mgath (const void *_buf, const H5S_t *space, size_t _len[H5D_XFER_HYPER_VECTOR_SIZE_DEF]; /* Array to store sequence lengths */ size_t *len=NULL; /* Pointer to sequence lengths */ size_t curr_len; /* Length of bytes left to process in sequence */ - size_t maxelem; /* Number of elements in the buffer */ size_t nseq; /* Number of sequences generated */ size_t curr_seq; /* Current sequence being processed */ size_t nelem; /* Number of elements used in sequences */ - hsize_t ret_value=nelmts; /* Number of elements gathered */ + size_t ret_value=nelmts; /* Number of elements gathered */ FUNC_ENTER_NOAPI(H5S_select_mgath, 0); @@ -1955,13 +1942,10 @@ H5S_select_mgath (const void *_buf, const H5S_t *space, off=_off; } /* end else */ - /* Compute the number of elements available in buffer */ - H5_ASSIGN_OVERFLOW(maxelem,nelmts,hsize_t,size_t); - /* Loop until all elements are written */ - while(maxelem>0) { + while(nelmts>0) { /* Get list of sequences for selection to write */ - if(H5S_SELECT_GET_SEQ_LIST(space,0,iter,dxpl_cache->vec_size,maxelem,&nseq,&nelem,off,len)<0) + if(H5S_SELECT_GET_SEQ_LIST(space,0,iter,dxpl_cache->vec_size,nelmts,&nseq,&nelem,off,len)<0) HGOTO_ERROR (H5E_INTERNAL, H5E_UNSUPPORTED, 0, "sequence length generation failed"); /* Loop, while sequences left to process */ @@ -1976,7 +1960,7 @@ H5S_select_mgath (const void *_buf, const H5S_t *space, } /* end for */ /* Decrement number of elements left to process */ - maxelem -= nelem; + nelmts -= nelem; } /* end while */ done: @@ -1272,7 +1272,7 @@ H5T_term_interface(void) H5T_print_stats(path, &nprint/*in,out*/); path->cdata.command = H5T_CONV_FREE; if ((path->func)(FAIL, FAIL, &(path->cdata), - (hsize_t)0, 0, 0, NULL, NULL,H5AC_dxpl_id)<0) { + 0, 0, 0, NULL, NULL,H5AC_dxpl_id)<0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) { fprintf (H5DEBUG(T), "H5T: conversion function " @@ -1995,7 +1995,7 @@ H5Tset_size(hid_t type_id, size_t size) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size must be positive"); if (size == H5T_VARIABLE && dt->type!=H5T_STRING) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "only strings may be variable length"); - if (H5T_ENUM==dt->type && dt->u.enumer.nmembs>0) + if (H5T_ENUM==dt->type && dt->u.enumer.nmembs>0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined"); if (H5T_REFERENCE==dt->type) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for this datatype"); @@ -2188,7 +2188,7 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register data types for conv query"); HDmemset(&cdata, 0, sizeof cdata); cdata.command = H5T_CONV_INIT; - if ((func)(tmp_sid, tmp_did, &cdata, (hsize_t)0, 0, 0, NULL, NULL, dxpl_id)<0) { + if ((func)(tmp_sid, tmp_did, &cdata, 0, 0, 0, NULL, NULL, dxpl_id)<0) { H5I_dec_ref(tmp_sid); H5I_dec_ref(tmp_did); tmp_sid = tmp_did = -1; @@ -2215,7 +2215,7 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, /* Free old path */ H5T_print_stats(old_path, &nprint); old_path->cdata.command = H5T_CONV_FREE; - if ((old_path->func)(tmp_sid, tmp_did, &(old_path->cdata), (hsize_t)0, 0, 0, NULL, NULL, dxpl_id)<0) { + if ((old_path->func)(tmp_sid, tmp_did, &(old_path->cdata), 0, 0, 0, NULL, NULL, dxpl_id)<0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) { fprintf (H5DEBUG(T), "H5T: conversion function 0x%08lx " @@ -2376,7 +2376,7 @@ H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, /* Shut down path */ H5T_print_stats(path, &nprint); path->cdata.command = H5T_CONV_FREE; - if ((path->func)(FAIL, FAIL, &(path->cdata), (hsize_t)0, 0, 0, NULL, NULL, + if ((path->func)(FAIL, FAIL, &(path->cdata), 0, 0, 0, NULL, NULL, dxpl_id)<0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) { @@ -2520,7 +2520,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Tconvert(hid_t src_id, hid_t dst_id, hsize_t nelmts, void *buf, +H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *background, hid_t dxpl_id) { H5T_path_t *tpath=NULL; /*type conversion info */ @@ -2633,6 +2633,7 @@ H5T_create(H5T_class_t type, size_t size) case H5T_ARRAY: /* Array datatype */ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, NULL, "base type required - use H5Tarray_create()"); + default: HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, NULL, "unknown data type class"); } @@ -2727,7 +2728,7 @@ H5T_open (H5G_entry_t *loc, const char *name, hid_t dxpl_id) /* Open the datatype object */ if ((dt=H5T_open_oid(&ent, dxpl_id)) ==NULL) HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, NULL, "not found"); - + /* Mark any datatypes as being in memory now */ if (H5T_set_loc(dt, NULL, H5T_LOC_MEMORY)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location") @@ -3808,7 +3809,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, HDstrcpy(H5T_g.path[0]->name, "no-op"); H5T_g.path[0]->func = H5T_conv_noop; H5T_g.path[0]->cdata.command = H5T_CONV_INIT; - if (H5T_conv_noop(FAIL, FAIL, &(H5T_g.path[0]->cdata), (hsize_t)0, 0, 0, + if (H5T_conv_noop(FAIL, FAIL, &(H5T_g.path[0]->cdata), 0, 0, 0, NULL, NULL, dxpl_id)<0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) { @@ -3896,7 +3897,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, H5T_copy(path->dst, H5T_COPY_ALL)))<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register destination conversion type for query"); path->cdata.command = H5T_CONV_INIT; - if ((func)(src_id, dst_id, &(path->cdata), (hsize_t)0, 0, 0, NULL, NULL, + if ((func)(src_id, dst_id, &(path->cdata), 0, 0, 0, NULL, NULL, dxpl_id)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to initialize conversion function"); if (src_id>=0) H5I_dec_ref(src_id); @@ -3925,7 +3926,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register conversion types for query"); path->cdata.command = H5T_CONV_INIT; if ((H5T_g.soft[i].func) (src_id, dst_id, &(path->cdata), - (hsize_t)0, 0, 0, NULL, NULL, dxpl_id)<0) { + 0, 0, 0, NULL, NULL, dxpl_id)<0) { HDmemset (&(path->cdata), 0, sizeof(H5T_cdata_t)); H5E_clear(NULL); /*ignore the error*/ } else { @@ -3968,7 +3969,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, assert(table==H5T_g.path[md]); H5T_print_stats(table, &nprint/*in,out*/); table->cdata.command = H5T_CONV_FREE; - if ((table->func)(FAIL, FAIL, &(table->cdata), (hsize_t)0, 0, 0, NULL, NULL, + if ((table->func)(FAIL, FAIL, &(table->cdata), 0, 0, 0, NULL, NULL, dxpl_id)<0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) { @@ -4114,7 +4115,7 @@ H5T_path_bkg(const H5T_path_t *p) *------------------------------------------------------------------------- */ herr_t -H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id, hsize_t nelmts, +H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist) { diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 8d3e44a..a8d1e50 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -48,8 +48,8 @@ typedef struct H5T_enum_struct_t { /* Conversion data for the hardware conversion functions */ typedef struct H5T_conv_hw_t { - hsize_t s_aligned; /*number source elements aligned */ - hsize_t d_aligned; /*number destination elements aligned*/ + size_t s_aligned; /*number source elements aligned */ + size_t d_aligned; /*number destination elements aligned*/ } H5T_conv_hw_t; /* Interface initialization */ @@ -676,7 +676,7 @@ static herr_t H5T_reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order */ herr_t H5T_conv_noop(hid_t UNUSED src_id, hid_t UNUSED dst_id, H5T_cdata_t *cdata, - hsize_t UNUSED nelmts, size_t UNUSED buf_stride, + size_t UNUSED nelmts, size_t UNUSED buf_stride, size_t UNUSED bkg_stride, void UNUSED *buf, void UNUSED *background, hid_t UNUSED dxpl_id) { @@ -725,14 +725,14 @@ done: */ herr_t H5T_conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *_buf, void UNUSED *background, hid_t UNUSED dxpl_id) { uint8_t *buf = (uint8_t*)_buf; H5T_t *src = NULL; H5T_t *dst = NULL; - hsize_t i; + size_t i; herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5T_conv_order_opt, FAIL); @@ -1130,14 +1130,14 @@ done: *------------------------------------------------------------------------- */ herr_t -H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, +H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *_buf, void UNUSED *background, hid_t UNUSED dxpl_id) { uint8_t *buf = (uint8_t*)_buf; H5T_t *src = NULL; H5T_t *dst = NULL; - hsize_t i; + size_t i; size_t j, md; herr_t ret_value=SUCCEED; /* Return value */ @@ -1227,15 +1227,15 @@ done: *------------------------------------------------------------------------- */ herr_t -H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, +H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *_buf, void UNUSED *background, hid_t dxpl_id) { uint8_t *buf = (uint8_t*)_buf; H5T_t *src=NULL, *dst=NULL; /*source and dest data types */ int direction; /*direction of traversal */ - hsize_t elmtno; /*element number */ - hsize_t olap; /*num overlapping elements */ + size_t elmtno; /*element number */ + size_t olap; /*num overlapping elements */ size_t half_size; /*1/2 of total size for swapping*/ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ uint8_t dbuf[256]; /*temp destination buffer */ @@ -1617,7 +1617,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, +H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg, hid_t dxpl_id) { @@ -1631,7 +1631,7 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */ size_t offset; /*byte offset wrt struct */ size_t src_delta; /*source stride */ - hsize_t elmtno; + size_t elmtno; unsigned u; /*counters */ int i; /*counters */ H5T_conv_struct_t *priv = (H5T_conv_struct_t *)(cdata->priv); @@ -1723,7 +1723,7 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, if (dst_memb->size <= src_memb->size) { if (H5T_convert(priv->memb_path[u], priv->src_memb_id[u], priv->dst_memb_id[src2dst[u]], - (hsize_t)1, 0, 0, /*no striding (packed array)*/ + 1, 0, 0, /*no striding (packed array)*/ xbuf+src_memb->offset, xbkg+dst_memb->offset, dxpl_id)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert compound data type member"); @@ -1753,7 +1753,7 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, offset -= src_memb->size; if (H5T_convert(priv->memb_path[i], priv->src_memb_id[i], priv->dst_memb_id[src2dst[i]], - (hsize_t)1, 0, 0, /*no striding (packed array)*/ + 1, 0, 0, /*no striding (packed array)*/ xbuf+offset, xbkg+dst_memb->offset, dxpl_id)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert compound data type member"); @@ -1851,7 +1851,7 @@ done: */ herr_t H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, + size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg, hid_t dxpl_id) { uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */ @@ -1864,7 +1864,7 @@ H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/ H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */ size_t offset; /*byte offset wrt struct */ - hsize_t elmtno; /*element counter */ + size_t elmtno; /*element counter */ unsigned u; /*counters */ int i; /*counters */ H5T_conv_struct_t *priv = NULL; /*private data */ @@ -2220,7 +2220,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, +H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *_buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -2229,7 +2229,7 @@ H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, uint8_t *s=NULL, *d=NULL; /*src and dst BUF pointers */ int src_delta, dst_delta; /*conversion strides */ int n; /*src value cast as native int */ - hsize_t i; /*counters */ + size_t i; /*counters */ H5T_enum_struct_t *priv = (H5T_enum_struct_t*)(cdata->priv); H5P_genplist_t *plist; /*property list pointer */ H5T_conv_cb_t cb_struct; /*conversion callback structure */ @@ -2422,7 +2422,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, +H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dxpl_id) { @@ -2440,16 +2440,15 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, ssize_t s_stride, d_stride; /*src and dst strides */ ssize_t b_stride; /*bkg stride */ size_t safe; /*how many elements are safe to process in each pass */ - hssize_t seq_len; /*the number of elements in the current sequence*/ - hsize_t bg_seq_len=0, parent_seq_len=0; + ssize_t seq_len; /*the number of elements in the current sequence*/ + size_t bg_seq_len=0; size_t src_base_size, dst_base_size;/*source & destination base size*/ void *conv_buf=NULL; /*temporary conversion buffer */ size_t conv_buf_size=0; /*size of conversion buffer in bytes */ void *tmp_buf=NULL; /*temporary background buffer */ size_t tmp_buf_size=0; /*size of temporary bkg buffer */ hbool_t nested=FALSE; /*flag of nested VL case */ - hsize_t elmtno; /*element number counter */ - hsize_t i; + size_t elmtno; /*element number counter */ herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5T_conv_vlen, FAIL); @@ -2594,9 +2593,8 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, else { size_t src_size, dst_size; /*source & destination total size in bytes*/ - H5_CHECK_OVERFLOW(seq_len,hssize_t,size_t); - src_size=(size_t)seq_len*src_base_size; - dst_size=(size_t)seq_len*dst_base_size; + src_size=seq_len*src_base_size; + dst_size=seq_len*dst_base_size; /* Check if conversion buffer is large enough, resize if * necessary */ @@ -2629,9 +2627,8 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, UINT32DECODE(tmp, bg_seq_len); 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=(size_t)(bg_seq_len*MAX(src_base_size, dst_base_size)); + if(tmp_buf_size<(bg_seq_len*MAX(src_base_size, dst_base_size))) { + tmp_buf_size=(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"); } @@ -2642,30 +2639,32 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, } /* end if */ /* If the sequence gets shorter, pad out the original sequence with zeros */ - H5_CHECK_OVERFLOW(bg_seq_len,hsize_t,hssize_t); - if((hssize_t)bg_seq_len<seq_len) { - H5_CHECK_OVERFLOW((seq_len-bg_seq_len),hsize_t,size_t); - HDmemset((uint8_t *)tmp_buf+dst_base_size*bg_seq_len,0,(size_t)(seq_len-bg_seq_len)*dst_base_size); + H5_CHECK_OVERFLOW(bg_seq_len,size_t,ssize_t); + if((ssize_t)bg_seq_len<seq_len) { + HDmemset((uint8_t *)tmp_buf+dst_base_size*bg_seq_len,0,(seq_len-bg_seq_len)*dst_base_size); } /* end if */ } /* end if */ /* Convert VL sequence */ - H5_CHECK_OVERFLOW(seq_len,hssize_t,hsize_t); - if (H5T_convert(tpath, tsrc_id, tdst_id, (hsize_t)seq_len, 0, 0, conv_buf, tmp_buf, dxpl_id)<0) + H5_CHECK_OVERFLOW(seq_len,ssize_t,size_t); + if (H5T_convert(tpath, tsrc_id, tdst_id, (size_t)seq_len, 0, 0, conv_buf, tmp_buf, dxpl_id)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed"); } /* end if */ /* Write sequence to destination location */ - if((*(dst->u.vlen.write))(dst->u.vlen.f,dxpl_id,&vl_alloc_info,d,conv_buf, b, (hsize_t)seq_len,(hsize_t)dst_base_size)<0) + if((*(dst->u.vlen.write))(dst->u.vlen.f,dxpl_id,&vl_alloc_info,d,conv_buf, b, (size_t)seq_len, dst_base_size)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't write VL data"); if(!noop_conv) { /* For nested VL case, free leftover heap objects from the deeper level if the length of new data elements is shorter than the old data elements.*/ - H5_CHECK_OVERFLOW(bg_seq_len,hsize_t,hssize_t); - if(nested && seq_len<(hssize_t)bg_seq_len) { + H5_CHECK_OVERFLOW(bg_seq_len,size_t,ssize_t); + if(nested && seq_len<(ssize_t)bg_seq_len) { + size_t parent_seq_len; + size_t u; + uint8_t *tmp_p=tmp_buf; tmp_p += seq_len*dst_base_size; - for(i=0; i<(bg_seq_len-seq_len); i++) { + for(u=0; u<(bg_seq_len-seq_len); u++) { UINT32DECODE(tmp_p, parent_seq_len); if(parent_seq_len>0) { H5F_addr_decode(dst->u.vlen.f, (const uint8_t **)&tmp_p, &(parent_hobjid.addr)); @@ -2731,7 +2730,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5T_conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, +H5T_conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void UNUSED *_bkg, hid_t dxpl_id) { @@ -2742,7 +2741,7 @@ H5T_conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, uint8_t *sp, *dp; /*source and dest traversal ptrs */ size_t src_delta, dst_delta; /*source & destination stride */ int direction; /*direction of traversal */ - hsize_t elmtno; /*element number counter */ + size_t elmtno; /*element number counter */ int i; /* local index variable */ void *bkg_buf=NULL; /*temporary background buffer */ size_t bkg_buf_size=0; /*size of background buffer in bytes */ @@ -2839,7 +2838,7 @@ H5T_conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, HDmemmove(dp, sp, src->size); /* Convert array */ - if (H5T_convert(tpath, tsrc_id, tdst_id, (hsize_t)src->u.array.nelem, 0, bkg_stride, dp, bkg_buf, dxpl_id)<0) + if (H5T_convert(tpath, tsrc_id, tdst_id, src->u.array.nelem, 0, bkg_stride, dp, bkg_buf, dxpl_id)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed"); /* Advance the source & destination pointers */ @@ -2896,16 +2895,16 @@ done: *------------------------------------------------------------------------- */ herr_t -H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, +H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t dxpl_id) { H5T_t *src = NULL; /*source data type */ H5T_t *dst = NULL; /*destination data type */ int direction; /*direction of traversal */ - hsize_t elmtno; /*element number */ + size_t elmtno; /*element number */ size_t half_size; /*half the type size */ - hsize_t olap; /*num overlapping elements */ + size_t olap; /*num overlapping elements */ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ uint8_t *src_rev; /*order-reversed source buffer */ uint8_t dbuf[64]; /*temp destination buffer */ @@ -3304,7 +3303,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, +H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t dxpl_id) { @@ -3314,9 +3313,9 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, H5T_atomic_t src; /*atomic source info */ H5T_atomic_t dst; /*atomic destination info */ int direction; /*forward or backward traversal */ - hsize_t elmtno; /*element number */ + size_t elmtno; /*element number */ size_t half_size; /*half the type size */ - hsize_t olap; /*num overlapping elements */ + size_t olap; /*num overlapping elements */ ssize_t bitno; /*bit number */ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ uint8_t *src_rev; /*order-reversed source buffer */ @@ -3330,7 +3329,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, size_t mrsh; /*amount to right shift mantissa*/ hbool_t carry=0; /*carry after rounding mantissa */ size_t i; /*miscellaneous counters */ - hsize_t implied; /*destination implied bits */ + size_t implied; /*destination implied bits */ H5P_genplist_t *plist; /*property list pointer */ H5T_conv_cb_t cb_struct={NULL, NULL}; /*conversion callback structure */ H5T_conv_ret_t except_ret; /*return of callback function */ @@ -3707,7 +3706,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, * If we had used a temporary buffer for the destination then we * should copy the value to the true destination buffer. */ - next: + /* next: */ if (d==dbuf) HDmemcpy (dp, d, dst_p->size); if (buf_stride) { @@ -3751,15 +3750,15 @@ done: *------------------------------------------------------------------------- */ herr_t -H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, +H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { H5T_t *src=NULL; /*source data type */ H5T_t *dst=NULL; /*destination data type */ int direction; /*direction of traversal */ - hsize_t elmtno; /*element number */ - hsize_t olap; /*num overlapping elements */ + size_t elmtno; /*element number */ + size_t olap; /*num overlapping elements */ size_t nchars=0; /*number of characters copied */ uint8_t *s, *sp, *d, *dp; /*src and dst traversal pointers*/ uint8_t *dbuf=NULL; /*temp buf for overlap convers. */ @@ -3974,7 +3973,7 @@ done: */ herr_t H5T_conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4007,7 +4006,7 @@ done: */ herr_t H5T_conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4040,7 +4039,7 @@ done: */ herr_t H5T_conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4073,7 +4072,7 @@ done: */ herr_t H5T_conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4106,7 +4105,7 @@ done: */ herr_t H5T_conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4139,7 +4138,7 @@ done: */ herr_t H5T_conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4172,7 +4171,7 @@ done: */ herr_t H5T_conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -4204,7 +4203,7 @@ done: */ herr_t H5T_conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -4236,7 +4235,7 @@ done: */ herr_t H5T_conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -4268,7 +4267,7 @@ done: */ herr_t H5T_conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -4300,7 +4299,7 @@ done: */ herr_t H5T_conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -4332,7 +4331,7 @@ done: */ herr_t H5T_conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4365,7 +4364,7 @@ done: */ herr_t H5T_conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -4397,7 +4396,7 @@ done: */ herr_t H5T_conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4430,7 +4429,7 @@ done: */ herr_t H5T_conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4463,7 +4462,7 @@ done: */ herr_t H5T_conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4496,7 +4495,7 @@ done: */ herr_t H5T_conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4529,7 +4528,7 @@ done: */ herr_t H5T_conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4562,7 +4561,7 @@ done: */ herr_t H5T_conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4595,7 +4594,7 @@ done: */ herr_t H5T_conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4628,7 +4627,7 @@ done: */ herr_t H5T_conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4661,7 +4660,7 @@ done: */ herr_t H5T_conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4694,7 +4693,7 @@ done: */ herr_t H5T_conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4727,7 +4726,7 @@ done: */ herr_t H5T_conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4760,7 +4759,7 @@ done: */ herr_t H5T_conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4793,7 +4792,7 @@ done: */ herr_t H5T_conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4826,7 +4825,7 @@ done: */ herr_t H5T_conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4859,7 +4858,7 @@ done: */ herr_t H5T_conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4892,7 +4891,7 @@ done: */ herr_t H5T_conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4925,7 +4924,7 @@ done: */ herr_t H5T_conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4958,7 +4957,7 @@ done: */ herr_t H5T_conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -4991,7 +4990,7 @@ done: */ herr_t H5T_conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5024,7 +5023,7 @@ done: */ herr_t H5T_conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5057,7 +5056,7 @@ done: */ herr_t H5T_conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5090,7 +5089,7 @@ done: */ herr_t H5T_conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5123,7 +5122,7 @@ done: */ herr_t H5T_conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5156,7 +5155,7 @@ done: */ herr_t H5T_conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5189,7 +5188,7 @@ done: */ herr_t H5T_conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5222,7 +5221,7 @@ done: */ herr_t H5T_conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5255,7 +5254,7 @@ done: */ herr_t H5T_conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5288,7 +5287,7 @@ done: */ herr_t H5T_conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5321,7 +5320,7 @@ done: */ herr_t H5T_conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5354,7 +5353,7 @@ done: */ herr_t H5T_conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5387,7 +5386,7 @@ done: */ herr_t H5T_conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5420,7 +5419,7 @@ done: */ herr_t H5T_conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -5452,7 +5451,7 @@ done: */ herr_t H5T_conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -5484,7 +5483,7 @@ done: */ herr_t H5T_conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -5516,7 +5515,7 @@ done: */ herr_t H5T_conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -5548,7 +5547,7 @@ done: */ herr_t H5T_conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -5580,7 +5579,7 @@ done: */ herr_t H5T_conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -5612,7 +5611,7 @@ done: */ herr_t H5T_conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -5644,7 +5643,7 @@ done: */ herr_t H5T_conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -5676,7 +5675,7 @@ done: */ herr_t H5T_conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -5708,7 +5707,7 @@ done: */ herr_t H5T_conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5741,7 +5740,7 @@ done: */ herr_t H5T_conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -5773,7 +5772,7 @@ done: */ herr_t H5T_conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -5805,7 +5804,7 @@ done: */ herr_t H5T_conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5838,7 +5837,7 @@ done: */ herr_t H5T_conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5871,7 +5870,7 @@ done: */ herr_t H5T_conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -5903,7 +5902,7 @@ done: */ herr_t H5T_conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -5936,7 +5935,7 @@ done: */ herr_t H5T_conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -5968,7 +5967,7 @@ done: */ herr_t H5T_conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6001,7 +6000,7 @@ done: */ herr_t H5T_conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -6033,7 +6032,7 @@ done: */ herr_t H5T_conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -6065,7 +6064,7 @@ done: */ herr_t H5T_conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -6097,7 +6096,7 @@ done: */ herr_t H5T_conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -6129,7 +6128,7 @@ done: */ herr_t H5T_conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -6161,7 +6160,7 @@ done: */ herr_t H5T_conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -6193,7 +6192,7 @@ done: */ herr_t H5T_conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -6225,7 +6224,7 @@ done: */ herr_t H5T_conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6258,7 +6257,7 @@ done: */ herr_t H5T_conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6291,7 +6290,7 @@ done: */ herr_t H5T_conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6324,7 +6323,7 @@ done: */ herr_t H5T_conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6357,7 +6356,7 @@ done: */ herr_t H5T_conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6390,7 +6389,7 @@ done: */ herr_t H5T_conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6423,7 +6422,7 @@ done: */ herr_t H5T_conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6456,7 +6455,7 @@ done: */ herr_t H5T_conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6489,7 +6488,7 @@ done: */ herr_t H5T_conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6522,7 +6521,7 @@ done: */ herr_t H5T_conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6555,7 +6554,7 @@ done: */ herr_t H5T_conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6588,7 +6587,7 @@ done: */ herr_t H5T_conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -6620,7 +6619,7 @@ done: */ herr_t H5T_conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -6652,7 +6651,7 @@ done: */ herr_t H5T_conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -6684,7 +6683,7 @@ done: */ herr_t H5T_conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6717,7 +6716,7 @@ done: */ herr_t H5T_conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { herr_t ret_value=SUCCEED; /* Return value */ @@ -6749,7 +6748,7 @@ done: */ herr_t H5T_conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6782,7 +6781,7 @@ done: */ herr_t H5T_conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6815,7 +6814,7 @@ done: */ herr_t H5T_conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6848,7 +6847,7 @@ done: */ herr_t H5T_conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6881,7 +6880,7 @@ done: */ herr_t H5T_conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6917,7 +6916,7 @@ done: */ herr_t H5T_conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6956,7 +6955,7 @@ done: */ herr_t H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -6988,7 +6987,7 @@ done: */ herr_t H5T_conv_char_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7020,7 +7019,7 @@ done: */ herr_t H5T_conv_char_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7052,7 +7051,7 @@ done: */ herr_t H5T_conv_uchar_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7084,7 +7083,7 @@ done: */ herr_t H5T_conv_uchar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7116,7 +7115,7 @@ done: */ herr_t H5T_conv_short_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7148,7 +7147,7 @@ done: */ herr_t H5T_conv_short_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7180,7 +7179,7 @@ done: */ herr_t H5T_conv_ushort_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7212,7 +7211,7 @@ done: */ herr_t H5T_conv_ushort_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7244,7 +7243,7 @@ done: */ herr_t H5T_conv_int_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7276,7 +7275,7 @@ done: */ herr_t H5T_conv_int_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7308,7 +7307,7 @@ done: */ herr_t H5T_conv_uint_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7340,7 +7339,7 @@ done: */ herr_t H5T_conv_uint_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7372,7 +7371,7 @@ done: */ herr_t H5T_conv_long_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7404,7 +7403,7 @@ done: */ herr_t H5T_conv_long_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7436,7 +7435,7 @@ done: */ herr_t H5T_conv_ulong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7468,7 +7467,7 @@ done: */ herr_t H5T_conv_ulong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7501,7 +7500,7 @@ done: */ herr_t H5T_conv_llong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7533,7 +7532,7 @@ done: */ herr_t H5T_conv_llong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7566,7 +7565,7 @@ done: */ herr_t H5T_conv_ullong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7598,7 +7597,7 @@ done: */ herr_t H5T_conv_ullong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7631,7 +7630,7 @@ done: */ herr_t H5T_conv_float_char (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7663,7 +7662,7 @@ done: */ herr_t H5T_conv_float_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7695,7 +7694,7 @@ done: */ herr_t H5T_conv_double_char (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7727,7 +7726,7 @@ done: */ herr_t H5T_conv_double_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7759,7 +7758,7 @@ done: */ herr_t H5T_conv_float_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7791,7 +7790,7 @@ done: */ herr_t H5T_conv_float_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7823,7 +7822,7 @@ done: */ herr_t H5T_conv_double_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7855,7 +7854,7 @@ done: */ herr_t H5T_conv_double_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7887,7 +7886,7 @@ done: */ herr_t H5T_conv_float_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7919,7 +7918,7 @@ done: */ herr_t H5T_conv_float_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7951,7 +7950,7 @@ done: */ herr_t H5T_conv_double_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -7983,7 +7982,7 @@ done: */ herr_t H5T_conv_double_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -8015,7 +8014,7 @@ done: */ herr_t H5T_conv_float_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -8047,7 +8046,7 @@ done: */ herr_t H5T_conv_float_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -8079,7 +8078,7 @@ done: */ herr_t H5T_conv_double_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -8111,7 +8110,7 @@ done: */ herr_t H5T_conv_double_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -8143,7 +8142,7 @@ done: */ herr_t H5T_conv_float_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -8175,7 +8174,7 @@ done: */ herr_t H5T_conv_float_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -8207,7 +8206,7 @@ done: */ herr_t H5T_conv_double_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { @@ -8239,7 +8238,7 @@ done: */ herr_t H5T_conv_double_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t dxpl_id) { @@ -8276,14 +8275,14 @@ done: */ herr_t H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t UNUSED dxpl_id) { uint8_t *s=NULL, *d=NULL; /*src and dst buf pointers */ uint8_t tmp[8]; /*temporary destination buffer */ H5T_t *src = NULL; /*source data type */ - hsize_t elmtno; /*element counter */ + size_t elmtno; /*element counter */ unsigned sign; /*sign bit */ unsigned cin, cout; /*carry in/out */ unsigned mbits=0; /*mantissa bits */ @@ -8667,7 +8666,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, +H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t dxpl_id) { @@ -8677,10 +8676,10 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, H5T_atomic_t src; /*atomic source info */ H5T_atomic_t dst; /*atomic destination info */ int direction; /*forward or backward traversal */ - hsize_t elmtno; /*element number */ + size_t elmtno; /*element number */ size_t half_size; /*half the type size */ ssize_t bitno; /*bit number */ - hsize_t olap; /*num overlapping elements */ + size_t olap; /*num overlapping elements */ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ uint8_t *src_rev; /*order-reversed source buffer */ uint8_t dbuf[64]; /*temp destination buffer */ @@ -9134,7 +9133,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5T_conv_i_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, +H5T_conv_i_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, hid_t dxpl_id) { @@ -9144,9 +9143,9 @@ H5T_conv_i_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, H5T_atomic_t src; /*atomic source info */ H5T_atomic_t dst; /*atomic destination info */ int direction; /*forward or backward traversal */ - hsize_t elmtno; /*element number */ + size_t elmtno; /*element number */ size_t half_size; /*half the type size */ - hsize_t olap; /*num overlapping elements */ + size_t olap; /*num overlapping elements */ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ uint8_t *src_rev; /*order-reversed source buffer */ uint8_t dbuf[64]; /*temp destination buffer */ @@ -9154,9 +9153,9 @@ H5T_conv_i_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, /* Conversion-related variables */ hsize_t expo; /*destiny exponent */ hsize_t expo_max; /*maximal possible exponent value */ - hsize_t sign = 0; /*source sign bit value */ - hsize_t is_max_neg = 0; /*source is maximal negative value*/ - hsize_t do_round = 0; /*whether there is roundup */ + size_t sign; /*source sign bit value */ + hbool_t is_max_neg; /*source is maximal negative value*/ + hbool_t do_round; /*whether there is roundup */ uint8_t *int_buf; /*buffer for temporary value */ size_t buf_size; /*buffer size for temporary value */ size_t i; /*miscellaneous counters */ diff --git a/src/H5Tnative.c b/src/H5Tnative.c index 1f4e686..20a2d40 100644 --- a/src/H5Tnative.c +++ b/src/H5Tnative.c @@ -370,7 +370,7 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member value") HDmemcpy(memb_value, tmp_memb_value, H5T_get_size(super_type)); - if(H5Tconvert(super_type_id, nat_super_type_id, (hsize_t)1, memb_value, NULL, H5P_DEFAULT)<0) + if(H5Tconvert(super_type_id, nat_super_type_id, 1, memb_value, NULL, H5P_DEFAULT)<0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member value") if(H5T_enum_insert(new_type, memb_name, memb_value)<0) diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 68789bb..6a80751 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -143,11 +143,11 @@ typedef struct H5T_enum_t { } H5T_enum_t; /* VL function pointers */ -typedef hssize_t (*H5T_vlen_getlenfunc_t)(void *vl_addr); +typedef ssize_t (*H5T_vlen_getlenfunc_t)(void *vl_addr); typedef void * (*H5T_vlen_getptrfunc_t)(void *vl_addr); typedef htri_t (*H5T_vlen_isnullfunc_t)(H5F_t *f, void *vl_addr); typedef herr_t (*H5T_vlen_readfunc_t)(H5F_t *f, hid_t dxpl_id, void *_vl, void *buf, size_t len); -typedef herr_t (*H5T_vlen_writefunc_t)(H5F_t *f, hid_t dxpl_id, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *buf, void *_bg, hsize_t seq_len, hsize_t base_size); +typedef herr_t (*H5T_vlen_writefunc_t)(H5F_t *f, hid_t dxpl_id, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *buf, void *_bg, size_t seq_len, size_t base_size); typedef herr_t (*H5T_vlen_setnullfunc_t)(H5F_t *f, hid_t dxpl_id, void *_vl, void *_bg); /* VL types */ @@ -336,734 +336,726 @@ H5_DLL herr_t H5T_set_size(H5T_t *dt, size_t size); /* Conversion functions */ H5_DLL herr_t H5T_conv_noop(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, - size_t bkg_stride, void *buf, void *bkg, - hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg, + hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, - size_t bkg_stride, void *_buf, void *bkg, - hid_t dset_xfer_plist); -H5_DLL herr_t H5T_conv_order_opt(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, - size_t buf_stride, size_t bkg_stride, - void *_buf, void *bkg, - hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg, + hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, - size_t bkg_stride, void *_buf, void *bkg, - hid_t dset_xfer_plist); -H5_DLL herr_t H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, - size_t buf_stride, size_t bkg_stride, - void *_buf, void *bkg, - hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg, + hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, - size_t bkg_stride, void *buf, void *bkg, - hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg, + hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, - size_t bkg_stride, void *buf, void *bkg, - hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg, + hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, - size_t bkg_stride, void *buf, void *bkg, - hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg, + hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, + size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg, hid_t dset_xfer_plist); -H5_DLL herr_t H5T_conv_schar_uchar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, - size_t buf_stride, size_t bkg_stride, - void *buf, void *bkg, - hid_t dset_xfer_plist); -H5_DLL herr_t H5T_conv_uchar_schar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, - size_t buf_stride, size_t bkg_stride, - void *buf, void *bkg, - hid_t dset_xfer_plist); -H5_DLL herr_t H5T_conv_schar_short(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, - size_t buf_stride, size_t bkg_stride, - void *buf, void *bkg, - hid_t dset_xfer_plist); -H5_DLL herr_t H5T_conv_schar_ushort(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, - size_t buf_stride, size_t bkg_stride, - void *buf, void *bkg, - hid_t dset_xfer_plist); -H5_DLL herr_t H5T_conv_uchar_short(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, - size_t buf_stride, size_t bkg_stride, - void *buf, void *bkg, - hid_t dset_xfer_plist); -H5_DLL herr_t H5T_conv_uchar_ushort(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, - size_t buf_stride, size_t bkg_stride, - void *buf, void *bkg, - hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg, + hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_schar_int(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_schar_uint(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uchar_int(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uchar_uint(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_schar_long(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_schar_ulong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uchar_long(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uchar_ulong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_schar_llong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_schar_ullong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uchar_llong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uchar_ullong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_short_schar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_short_uchar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ushort_schar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ushort_uchar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_short_ushort(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ushort_short(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_short_int(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_short_uint(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ushort_int(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ushort_uint(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_short_long(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_short_ulong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ushort_long(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ushort_ulong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_short_llong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_short_ullong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ushort_llong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ushort_ullong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_int_schar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_int_uchar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uint_schar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uint_uchar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_int_short(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_int_ushort(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uint_short(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uint_ushort(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_int_uint(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uint_int(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_int_long(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_int_ulong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uint_long(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uint_ulong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_int_llong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_int_ullong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uint_llong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uint_ullong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_long_schar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_long_uchar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ulong_schar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ulong_uchar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_long_short(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_long_ushort(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ulong_short(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ulong_ushort(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_long_int(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_long_uint(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ulong_int(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ulong_uint(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_long_ulong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ulong_long(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_long_llong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_long_ullong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ulong_llong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ulong_ullong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_llong_schar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_llong_uchar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ullong_schar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ullong_uchar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_llong_short(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_llong_ushort(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ullong_short(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ullong_ushort(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_llong_int(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_llong_uint(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ullong_int(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ullong_uint(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_llong_long(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_llong_ulong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ullong_long(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ullong_ulong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_llong_ullong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ullong_llong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_float_double(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_double_float(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_char_float(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_char_double(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uchar_float(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uchar_double(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_short_float(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_short_double(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ushort_float(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ushort_double(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_int_float(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_int_double(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uint_float(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_uint_double(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_long_float(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_long_double(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ulong_float(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ulong_double(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_llong_float(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_llong_double(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); #ifdef H5_ULLONG_TO_FP_CAST_WORKS H5_DLL herr_t H5T_conv_ullong_float(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_ullong_double(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); #endif /* H5_ULLONG_TO_FP_CAST_WORKS */ H5_DLL herr_t H5T_conv_float_char(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_float_uchar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_float_short(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_float_ushort(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_float_int(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_float_uint(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_float_long(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_float_ulong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_float_llong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_float_ullong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_double_char(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_double_uchar(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_double_short(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_double_ushort(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_double_int(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_double_uint(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_double_long(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_double_ulong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_double_llong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_double_ullong(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_i32le_f64le(hid_t src_id, hid_t dst_id, - H5T_cdata_t *cdata, hsize_t nelmts, + H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg, hid_t dset_xfer_plist); diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h index 5c76e82..31fa493 100644 --- a/src/H5Tprivate.h +++ b/src/H5Tprivate.h @@ -84,7 +84,7 @@ H5_DLL H5T_path_t *H5T_path_find(const H5T_t *src, const H5T_t *dst, H5_DLL hbool_t H5T_path_noop(const H5T_path_t *p); H5_DLL H5T_bkg_t H5T_path_bkg(const H5T_path_t *p); H5_DLL herr_t H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id, - hsize_t nelmts, size_t buf_stride, size_t bkg_stride, + size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); H5_DLL herr_t H5T_vlen_reclaim(void *elem, hid_t type_id, hsize_t ndim, hssize_t *point, void *_op_data); H5_DLL herr_t H5T_vlen_get_alloc_info(hid_t dxpl_id, H5T_vlen_alloc_info_t *vl_alloc_info); diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h index 403419f..3fec470 100644 --- a/src/H5Tpublic.h +++ b/src/H5Tpublic.h @@ -198,7 +198,7 @@ extern "C" { /* All datatype conversion functions are... */ typedef herr_t (*H5T_conv_t) (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - hsize_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, + size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); /* Exception handler. If an exception like overflow happenes during conversion, @@ -573,7 +573,7 @@ H5_DLL herr_t H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, H5_DLL herr_t H5Tunregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, H5T_conv_t func); H5_DLL H5T_conv_t H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata); -H5_DLL herr_t H5Tconvert(hid_t src_id, hid_t dst_id, hsize_t nelmts, +H5_DLL herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *background, hid_t plist_id); #ifdef __cplusplus diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c index b5b8ba9..628c1e3 100644 --- a/src/H5Tvlen.c +++ b/src/H5Tvlen.c @@ -40,23 +40,23 @@ static herr_t H5T_init_vlen_interface(void); /* Local functions */ static herr_t H5T_vlen_reclaim_recurse(void *elem, const H5T_t *dt, H5MM_free_t free_func, void *free_info); -static hssize_t H5T_vlen_seq_mem_getlen(void *_vl); +static ssize_t H5T_vlen_seq_mem_getlen(void *_vl); static void * H5T_vlen_seq_mem_getptr(void *_vl); static htri_t H5T_vlen_seq_mem_isnull(H5F_t *f, void *_vl); static herr_t H5T_vlen_seq_mem_read(H5F_t *f, hid_t dxpl_id, void *_vl, void *_buf, size_t len); -static herr_t H5T_vlen_seq_mem_write(H5F_t *f, hid_t dxpl_id, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *_buf, void *_bg, hsize_t seq_len, hsize_t base_size); +static herr_t H5T_vlen_seq_mem_write(H5F_t *f, hid_t dxpl_id, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *_buf, void *_bg, size_t seq_len, size_t base_size); static herr_t H5T_vlen_seq_mem_setnull(H5F_t *f, hid_t dxpl_id, void *_vl, void *_bg); -static hssize_t H5T_vlen_str_mem_getlen(void *_vl); +static ssize_t H5T_vlen_str_mem_getlen(void *_vl); static void * H5T_vlen_str_mem_getptr(void *_vl); static htri_t H5T_vlen_str_mem_isnull(H5F_t *f, void *_vl); static herr_t H5T_vlen_str_mem_read(H5F_t *f, hid_t dxpl_id, void *_vl, void *_buf, size_t len); -static herr_t H5T_vlen_str_mem_write(H5F_t *f, hid_t dxpl_id, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *_buf, void *_bg, hsize_t seq_len, hsize_t base_size); +static herr_t H5T_vlen_str_mem_write(H5F_t *f, hid_t dxpl_id, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *_buf, void *_bg, size_t seq_len, size_t base_size); static herr_t H5T_vlen_str_mem_setnull(H5F_t *f, hid_t dxpl_id, void *_vl, void *_bg); -static hssize_t H5T_vlen_disk_getlen(void *_vl); +static ssize_t H5T_vlen_disk_getlen(void *_vl); static void * H5T_vlen_disk_getptr(void *_vl); static htri_t H5T_vlen_disk_isnull(H5F_t *f, void *_vl); static herr_t H5T_vlen_disk_read(H5F_t *f, hid_t dxpl_id, void *_vl, void *_buf, size_t len); -static herr_t H5T_vlen_disk_write(H5F_t *f, hid_t dxpl_id, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *_buf, void *_bg, hsize_t seq_len, hsize_t base_size); +static herr_t H5T_vlen_disk_write(H5F_t *f, hid_t dxpl_id, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *_buf, void *_bg, size_t seq_len, size_t base_size); static herr_t H5T_vlen_disk_setnull(H5F_t *f, hid_t dxpl_id, void *_vl, void *_bg); /* Local variables */ @@ -316,7 +316,7 @@ done: * *------------------------------------------------------------------------- */ -static hssize_t +static ssize_t H5T_vlen_seq_mem_getlen(void *_vl) { hvl_t *vl=(hvl_t *)_vl; /* Pointer to the user's hvl_t information */ @@ -326,7 +326,7 @@ H5T_vlen_seq_mem_getlen(void *_vl) /* check parameters */ assert(vl); - FUNC_LEAVE_NOAPI((hssize_t)vl->len) + FUNC_LEAVE_NOAPI((ssize_t)vl->len) } /* end H5T_vlen_seq_mem_getlen() */ @@ -435,7 +435,7 @@ H5T_vlen_seq_mem_read(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_vl, void *bu */ /* ARGSUSED */ static herr_t -H5T_vlen_seq_mem_write(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *buf, void UNUSED *_bg, hsize_t seq_len, hsize_t base_size) +H5T_vlen_seq_mem_write(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *buf, void UNUSED *_bg, size_t seq_len, size_t base_size) { hvl_t vl; /* Temporary hvl_t to use during operation */ size_t len; @@ -448,7 +448,7 @@ H5T_vlen_seq_mem_write(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const H5T_vlen_all assert(buf); if(seq_len!=0) { - H5_ASSIGN_OVERFLOW(len,(seq_len*base_size),hsize_t,size_t); + len=seq_len*base_size; /* Use the user's memory allocation routine is one is defined */ if(vl_alloc_info->alloc_func!=NULL) { @@ -468,7 +468,7 @@ H5T_vlen_seq_mem_write(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const H5T_vlen_all vl.p=NULL; /* Set the sequence length */ - H5_ASSIGN_OVERFLOW(vl.len,seq_len,hsize_t,size_t); + vl.len=seq_len; /* Set pointer in user's buffer with memcpy, to avoid alignment issues */ HDmemcpy(_vl,&vl,sizeof(hvl_t)); @@ -528,7 +528,7 @@ H5T_vlen_seq_mem_setnull(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_vl, void * *------------------------------------------------------------------------- */ -static hssize_t +static ssize_t H5T_vlen_str_mem_getlen(void *_vl) { char *s=*(char **)_vl; /* Pointer to the user's string information */ @@ -538,7 +538,7 @@ H5T_vlen_str_mem_getlen(void *_vl) /* check parameters */ assert(s); - FUNC_LEAVE_NOAPI((hssize_t)HDstrlen(s)) + FUNC_LEAVE_NOAPI((ssize_t)HDstrlen(s)) } /* end H5T_vlen_str_mem_getlen() */ @@ -646,7 +646,7 @@ H5T_vlen_str_mem_read(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_vl, void *bu */ /* ARGSUSED */ static herr_t -H5T_vlen_str_mem_write(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *buf, void UNUSED *_bg, hsize_t seq_len, hsize_t base_size) +H5T_vlen_str_mem_write(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const H5T_vlen_alloc_info_t *vl_alloc_info, void *_vl, void *buf, void UNUSED *_bg, size_t seq_len, size_t base_size) { char *t; /* Pointer to temporary buffer allocated */ size_t len; /* Maximum length of the string to copy */ @@ -656,19 +656,18 @@ H5T_vlen_str_mem_write(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const H5T_vlen_all /* check parameters */ assert(buf); - H5_CHECK_OVERFLOW(((seq_len+1)*base_size),hsize_t,size_t); /* Use the user's memory allocation routine if one is defined */ if(vl_alloc_info->alloc_func!=NULL) { - if(NULL==(t=(vl_alloc_info->alloc_func)((size_t)((seq_len+1)*base_size),vl_alloc_info->alloc_info))) + if(NULL==(t=(vl_alloc_info->alloc_func)((seq_len+1)*base_size,vl_alloc_info->alloc_info))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for VL data") } /* end if */ else { /* Default to system malloc */ - if(NULL==(t=H5MM_malloc((size_t)((seq_len+1)*base_size)))) + if(NULL==(t=H5MM_malloc((seq_len+1)*base_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for VL data") } /* end else */ - H5_ASSIGN_OVERFLOW(len,(seq_len*base_size),hsize_t,size_t); + len=(seq_len*base_size); HDmemcpy(t,buf,len); t[len]='\0'; @@ -723,11 +722,11 @@ H5T_vlen_str_mem_setnull(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_vl, void * *------------------------------------------------------------------------- */ -static hssize_t +static ssize_t H5T_vlen_disk_getlen(void *_vl) { uint8_t *vl=(uint8_t *)_vl; /* Pointer to the disk VL information */ - hssize_t seq_len; /* Sequence length */ + size_t seq_len; /* Sequence length */ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_disk_getlen) @@ -736,7 +735,7 @@ H5T_vlen_disk_getlen(void *_vl) UINT32DECODE(vl, seq_len); - FUNC_LEAVE_NOAPI(seq_len) + FUNC_LEAVE_NOAPI((ssize_t)seq_len) } /* end H5T_vlen_disk_getlen() */ @@ -871,7 +870,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5T_vlen_disk_write(H5F_t *f, hid_t dxpl_id, const H5T_vlen_alloc_info_t UNUSED *vl_alloc_info, void *_vl, void *buf, void *_bg, hsize_t seq_len, hsize_t base_size) +H5T_vlen_disk_write(H5F_t *f, hid_t dxpl_id, const H5T_vlen_alloc_info_t UNUSED *vl_alloc_info, void *_vl, void *buf, void *_bg, size_t seq_len, size_t base_size) { uint8_t *vl=(uint8_t *)_vl; /*Pointer to the user's hvl_t information*/ uint8_t *bg=(uint8_t *)_bg; /*Pointer to the old data hvl_t */ @@ -888,7 +887,7 @@ H5T_vlen_disk_write(H5F_t *f, hid_t dxpl_id, const H5T_vlen_alloc_info_t UNUSED /* Free heap object for old data. */ if(bg!=NULL) { - hsize_t bg_seq_len=0; /* "Background" VL info sequence's length */ + size_t bg_seq_len; /* "Background" VL info sequence's length */ H5HG_t bg_hobjid; /* "Background" VL info sequence's ID info */ /* Get the length of the sequence and heap object ID from background data. */ @@ -907,11 +906,10 @@ H5T_vlen_disk_write(H5F_t *f, hid_t dxpl_id, const H5T_vlen_alloc_info_t UNUSED } /* end if */ /* Set the length of the sequence */ - H5_CHECK_OVERFLOW(seq_len,hsize_t,size_t); UINT32ENCODE(vl, seq_len); /* Write the VL information to disk (allocates space also) */ - H5_ASSIGN_OVERFLOW(len,(seq_len*base_size),hsize_t,size_t); + len=(seq_len*base_size); if(H5HG_insert(f,dxpl_id,len,buf,&hobjid)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "Unable to write VL information") diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h index 0c43bf7..4e26f31 100644 --- a/src/H5Zprivate.h +++ b/src/H5Zprivate.h @@ -70,7 +70,7 @@ typedef struct H5Z_data_xform_t H5Z_data_xform_t; /* Defined in H5Ztrans.c */ H5_DLL H5Z_data_xform_t *H5Z_xform_create(const char *expr); H5_DLL herr_t H5Z_xform_copy(H5Z_data_xform_t **data_xform_prop); H5_DLL herr_t H5Z_xform_destroy(H5Z_data_xform_t *data_xform_prop); -H5_DLL herr_t H5Z_xform_eval(const H5Z_data_xform_t *data_xform_prop, void* array, hsize_t array_size, const H5T_t *buf_type); +H5_DLL herr_t H5Z_xform_eval(const H5Z_data_xform_t *data_xform_prop, void* array, size_t array_size, const H5T_t *buf_type); H5_DLL hbool_t H5Z_xform_noop(const H5Z_data_xform_t *data_xform_prop); #endif diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c index 705fd3d..b7f242c 100644 --- a/src/H5Ztrans.c +++ b/src/H5Ztrans.c @@ -91,7 +91,7 @@ static H5Z_node *H5Z_parse_factor(H5Z_token *current); static H5Z_node *H5Z_new_node(H5Z_token_type type); static void H5Z_do_op(H5Z_node* tree); static hid_t H5Z_xform_find_type(const H5T_t* type); -static H5Z_result H5Z_eval_full(H5Z_node *tree, void* array, hsize_t array_size, hid_t array_type); +static H5Z_result H5Z_eval_full(H5Z_node *tree, void* array, size_t array_size, hid_t array_type); static void H5Z_xform_destroy_parse_tree(H5Z_node *tree); static void* H5Z_xform_parse(const char *expression); static void* H5Z_xform_copy_tree(H5Z_node* tree); @@ -722,7 +722,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5Z_eval_full + * Function: H5Z_xform_eval * Purpose: If the transform is trivial, this function applies it. * Otherwise, it calls H5Z_xform_eval_full to do the full * transform. @@ -734,11 +734,11 @@ done: *------------------------------------------------------------------------- */ -herr_t H5Z_xform_eval(const H5Z_data_xform_t *data_xform_prop, void* array, hsize_t array_size, const H5T_t *buf_type) +herr_t H5Z_xform_eval(const H5Z_data_xform_t *data_xform_prop, void* array, size_t array_size, const H5T_t *buf_type) { H5Z_node *tree; hid_t array_type; - unsigned int i; + size_t i; int n; float f; H5Z_result res; @@ -822,11 +822,11 @@ done: *------------------------------------------------------------------------- */ static H5Z_result -H5Z_eval_full(H5Z_node *tree, void* array, hsize_t array_size, hid_t array_type) +H5Z_eval_full(H5Z_node *tree, void* array, size_t array_size, hid_t array_type) { H5Z_result res, resl, resr, ret_value, error; - unsigned int i; + size_t i; error.type = H5Z_XFORM_ERROR; diff --git a/test/dtypes.c b/test/dtypes.c index a01e765..914b432 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -191,7 +191,7 @@ overflow_handler(hid_t UNUSED src_id, hid_t UNUSED dst_id, *------------------------------------------------------------------------- */ static H5T_conv_ret_t -except_func(int except_type, hid_t src_id, hid_t dst_id, void *src_buf, +except_func(int except_type, hid_t UNUSED src_id, hid_t UNUSED dst_id, void UNUSED *src_buf, void *dst_buf, void *user_data) { H5T_conv_ret_t ret = H5T_CONV_HANDLED; @@ -640,7 +640,7 @@ test_compound_2(void) int e, d, c[4], b, a; } *d_ptr; - const int nelmts = NTESTELEM; + const size_t nelmts = NTESTELEM; const hsize_t four = 4; unsigned char *buf=NULL, *orig=NULL, *bkg=NULL; hid_t st=-1, dt=-1; @@ -653,7 +653,7 @@ test_compound_2(void) buf = malloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt))); bkg = malloc(nelmts * sizeof(struct dt)); orig = malloc(nelmts * sizeof(struct st)); - for (i=0; i<nelmts; i++) { + for (i=0; i<(int)nelmts; i++) { s_ptr = ((struct st*)orig) + i; s_ptr->a = i*8+0; s_ptr->b = i*8+1; @@ -688,10 +688,10 @@ test_compound_2(void) H5Tclose(array_dt); /* Perform the conversion */ - if (H5Tconvert(st, dt, (hsize_t)nelmts, buf, bkg, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(st, dt, nelmts, buf, bkg, H5P_DEFAULT)<0) goto error; /* Compare results */ - for (i=0; i<nelmts; i++) { + for (i=0; i<(int)nelmts; i++) { s_ptr = ((struct st*)orig) + i; d_ptr = ((struct dt*)buf) + i; if (s_ptr->a != d_ptr->a || @@ -757,7 +757,7 @@ test_compound_3(void) int a, c[4], e; } *d_ptr; - const int nelmts = NTESTELEM; + const size_t nelmts = NTESTELEM; const hsize_t four = 4; unsigned char *buf=NULL, *orig=NULL, *bkg=NULL; hid_t st=-1, dt=-1; @@ -770,7 +770,7 @@ test_compound_3(void) buf = malloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt))); bkg = malloc(nelmts * sizeof(struct dt)); orig = malloc(nelmts * sizeof(struct st)); - for (i=0; i<nelmts; i++) { + for (i=0; i<(int)nelmts; i++) { s_ptr = ((struct st*)orig) + i; s_ptr->a = i*8+0; s_ptr->b = i*8+1; @@ -803,11 +803,11 @@ test_compound_3(void) H5Tclose(array_dt); /* Perform the conversion */ - if (H5Tconvert(st, dt, (hsize_t)nelmts, buf, bkg, H5P_DEFAULT)<0) + if (H5Tconvert(st, dt, nelmts, buf, bkg, H5P_DEFAULT)<0) goto error; /* Compare results */ - for (i=0; i<nelmts; i++) { + for (i=0; i<(int)nelmts; i++) { s_ptr = ((struct st*)orig) + i; d_ptr = ((struct dt*)buf) + i; if (s_ptr->a != d_ptr->a || @@ -875,7 +875,7 @@ test_compound_4(void) int e; } *d_ptr; - const int nelmts = NTESTELEM; + const size_t nelmts = NTESTELEM; const hsize_t four = 4; unsigned char *buf=NULL, *orig=NULL, *bkg=NULL; hid_t st=-1, dt=-1; @@ -888,7 +888,7 @@ test_compound_4(void) buf = malloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt))); bkg = malloc(nelmts * sizeof(struct dt)); orig = malloc(nelmts * sizeof(struct st)); - for (i=0; i<nelmts; i++) { + for (i=0; i<(int)nelmts; i++) { s_ptr = ((struct st*)orig) + i; s_ptr->a = i*8+0; s_ptr->b = (i*8+1) & 0x7fff; @@ -923,11 +923,11 @@ test_compound_4(void) H5Tclose(array_dt); /* Perform the conversion */ - if (H5Tconvert(st, dt, (hsize_t)nelmts, buf, bkg, H5P_DEFAULT)<0) + if (H5Tconvert(st, dt, nelmts, buf, bkg, H5P_DEFAULT)<0) goto error; /* Compare results */ - for (i=0; i<nelmts; i++) { + for (i=0; i<(int)nelmts; i++) { s_ptr = ((struct st*)orig) + i; d_ptr = ((struct dt*)buf) + i; if (s_ptr->a != d_ptr->a || @@ -1044,7 +1044,7 @@ test_compound_5(void) /* Convert data */ HDmemcpy(buf, src, sizeof(src)); - H5Tconvert(src_type, dst_type, (hsize_t)2, buf, bkg, H5P_DEFAULT); + H5Tconvert(src_type, dst_type, 2, buf, bkg, H5P_DEFAULT); dst = (dst_type_t*)buf; /* Cleanup */ @@ -1106,7 +1106,7 @@ test_compound_6(void) long d; } *d_ptr; - const int nelmts = NTESTELEM; + const size_t nelmts = NTESTELEM; unsigned char *buf=NULL, *orig=NULL, *bkg=NULL; hid_t st=-1, dt=-1; int i; @@ -1117,7 +1117,7 @@ test_compound_6(void) buf = malloc(nelmts * MAX(sizeof(struct st), sizeof(struct dt))); bkg = malloc(nelmts * sizeof(struct dt)); orig = malloc(nelmts * sizeof(struct st)); - for (i=0; i<nelmts; i++) { + for (i=0; i<(int)nelmts; i++) { s_ptr = ((struct st*)orig) + i; s_ptr->b = (i*8+1) & 0x7fff; s_ptr->d = (i*8+6) & 0x7fff; @@ -1140,13 +1140,13 @@ test_compound_6(void) } /* Perform the conversion */ - if (H5Tconvert(st, dt, (hsize_t)nelmts, buf, bkg, H5P_DEFAULT)<0) { + if (H5Tconvert(st, dt, nelmts, buf, bkg, H5P_DEFAULT)<0) { H5_FAILED(); goto error; } /* Compare results */ - for (i=0; i<nelmts; i++) { + for (i=0; i<(int)nelmts; i++) { s_ptr = ((struct st*)orig) + i; d_ptr = ((struct dt*)buf) + i; if (s_ptr->b != d_ptr->b || @@ -2249,13 +2249,13 @@ test_conv_str_1(void) dst_type = mkstr(5, H5T_STR_NULLTERM); buf = HDcalloc(2, 10); HDmemcpy(buf, "abcdefghi\0abcdefghi\0", 20); - if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcd\0abcd\0abcdefghi\0", 20)) { H5_FAILED(); HDputs(" Truncated C-string test failed"); goto error; } - if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", 20)) { H5_FAILED(); HDputs(" Extended C-string test failed"); @@ -2272,13 +2272,13 @@ test_conv_str_1(void) dst_type = mkstr(5, H5T_STR_NULLPAD); buf = HDcalloc(2, 10); HDmemcpy(buf, "abcdefghijabcdefghij", 20); - if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcdeabcdeabcdefghij", 20)) { H5_FAILED(); HDputs(" Truncated C buffer test failed"); goto error; } - if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) { H5_FAILED(); HDputs(" Extended C buffer test failed"); @@ -2295,13 +2295,13 @@ test_conv_str_1(void) dst_type = mkstr(5, H5T_STR_SPACEPAD); buf = HDcalloc(2, 10); HDmemcpy(buf, "abcdefghijabcdefghij", 20); - if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcdeabcdeabcdefghij", 20)) { H5_FAILED(); HDputs(" Truncated Fortran-string test failed"); goto error; } - if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcde abcde ", 20)) { H5_FAILED(); HDputs(" Extended Fortran-string test failed"); @@ -2321,7 +2321,7 @@ test_conv_str_1(void) dst_type = mkstr(10, H5T_STR_NULLTERM); buf = HDcalloc(2, 10); HDmemcpy(buf, "abcdefghijabcdefghij", 20); - if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcdefghijabcdefghij", 20)) { H5_FAILED(); HDputs(" Non-terminated string test 1"); @@ -2330,14 +2330,14 @@ test_conv_str_1(void) H5Tclose(dst_type); dst_type = mkstr(5, H5T_STR_NULLTERM); HDmemcpy(buf, "abcdefghijabcdefghij", 20); - if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcd\0abcd\0abcdefghij", 20)) { H5_FAILED(); HDputs(" Non-terminated string test 2"); goto error; } HDmemcpy(buf, "abcdeabcdexxxxxxxxxx", 20); - if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) { H5_FAILED(); HDputs(" Non-terminated string test 2"); @@ -2354,13 +2354,13 @@ test_conv_str_1(void) dst_type = mkstr(10, H5T_STR_SPACEPAD); buf = HDcalloc(2, 10); HDmemcpy(buf, "abcdefghi\0abcdefghi\0", 20); - if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcdefghi abcdefghi ", 20)) { H5_FAILED(); HDputs(" C string to Fortran test 1"); goto error; } - if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcdefghi\0abcdefghi\0", 20)) { H5_FAILED(); HDputs(" Fortran to C string test 1"); @@ -2369,13 +2369,13 @@ test_conv_str_1(void) if (H5Tclose(dst_type)<0) goto error; dst_type = mkstr(5, H5T_STR_SPACEPAD); HDmemcpy(buf, "abcdefgh\0\0abcdefgh\0\0", 20); - if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", 20)) { H5_FAILED(); HDputs(" C string to Fortran test 2"); goto error; } - if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) { H5_FAILED(); HDputs(" Fortran to C string test 2"); @@ -2386,13 +2386,13 @@ test_conv_str_1(void) src_type = mkstr(5, H5T_STR_NULLTERM); dst_type = mkstr(10, H5T_STR_SPACEPAD); HDmemcpy(buf, "abcd\0abcd\0xxxxxxxxxx", 20); - if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcd abcd ", 20)) { H5_FAILED(); HDputs(" C string to Fortran test 3"); goto error; } - if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcd\0abcd\0abcd ", 20)) { H5_FAILED(); HDputs(" Fortran to C string test 3"); @@ -2409,13 +2409,13 @@ test_conv_str_1(void) dst_type = mkstr(10, H5T_STR_SPACEPAD); buf = HDcalloc(2, 10); HDmemcpy(buf, "abcdefghijabcdefghij", 20); - if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcdefghijabcdefghij", 20)) { H5_FAILED(); HDputs(" C buffer to Fortran test 1"); goto error; } - if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcdefghijabcdefghij", 20)) { H5_FAILED(); HDputs(" Fortran to C buffer test 1"); @@ -2424,13 +2424,13 @@ test_conv_str_1(void) if (H5Tclose(dst_type)<0) goto error; dst_type = mkstr(5, H5T_STR_SPACEPAD); HDmemcpy(buf, "abcdefgh\0\0abcdefgh\0\0", 20); - if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", 20)) { H5_FAILED(); HDputs(" C buffer to Fortran test 2"); goto error; } - if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) { H5_FAILED(); HDputs(" Fortran to C buffer test 2"); @@ -2441,13 +2441,13 @@ test_conv_str_1(void) src_type = mkstr(5, H5T_STR_NULLPAD); dst_type = mkstr(10, H5T_STR_SPACEPAD); HDmemcpy(buf, "abcd\0abcd\0xxxxxxxxxx", 20); - if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcd abcd ", 20)) { H5_FAILED(); HDputs(" C buffer to Fortran test 3"); goto error; } - if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error; if (HDmemcmp(buf, "abcd\0abcd\0abcd ", 20)) { H5_FAILED(); HDputs(" Fortran to C buffer test 3"); @@ -2516,9 +2516,9 @@ test_conv_str_2(void) } printf("%-70s", s); HDfflush(stdout); - if (H5Tconvert(c_type, f_type, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) + if (H5Tconvert(c_type, f_type, nelmts, buf, NULL, H5P_DEFAULT)<0) goto error; - if (H5Tconvert(f_type, c_type, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) + if (H5Tconvert(f_type, c_type, nelmts, buf, NULL, H5P_DEFAULT)<0) goto error; PASSED(); } @@ -2550,7 +2550,8 @@ test_conv_str_2(void) static int test_conv_enum_1(void) { - const int nelmts=NTESTELEM, ntests=NTESTS; + const size_t nelmts=NTESTELEM; + const int ntests=NTESTS; int i, val, *buf=NULL; hid_t t1, t2; char s[80]; @@ -2568,7 +2569,7 @@ test_conv_enum_1(void) /* Initialize the buffer */ buf = HDmalloc(nelmts*MAX(H5Tget_size(t1), H5Tget_size(t2))); - for (i=0; i<nelmts; i++) + for (i=0; i<(int)nelmts; i++) buf[i] = HDrand() % 26; /* Conversions */ @@ -2581,7 +2582,7 @@ test_conv_enum_1(void) } printf("%-70s", s); HDfflush(stdout); - if (H5Tconvert(t1, t2, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(t1, t2, nelmts, buf, NULL, H5P_DEFAULT)<0) goto error; PASSED(); } @@ -2594,7 +2595,7 @@ test_conv_enum_1(void) } printf("%-70s", s); HDfflush(stdout); - if (H5Tconvert(t2, t1, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(t2, t1, nelmts, buf, NULL, H5P_DEFAULT)<0) goto error; PASSED(); } ret_value = 0; @@ -2664,7 +2665,7 @@ test_conv_enum_2(void) } /* Convert to destination type */ - H5Tconvert(srctype, dsttype, (hsize_t)NTESTELEM, data, NULL, H5P_DEFAULT); + H5Tconvert(srctype, dsttype, NTESTELEM, data, NULL, H5P_DEFAULT); /* Check results */ for (i=0; i<NTESTELEM; i++) { @@ -2728,7 +2729,7 @@ test_conv_bitfield(void) dt = H5Tcopy(H5T_STD_B32LE); buf[0] = buf[1] = 0xAA; buf[2] = buf[3] = 0x55; /*irrelevant*/ - if (H5Tconvert(st, dt, (hsize_t)1, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(st, dt, 1, buf, NULL, H5P_DEFAULT)<0) goto error; if (buf[0]!=0xAA || buf[1]!=0xAA || buf[2]!=0 || buf[3]!=0) { H5_FAILED(); printf(" s=0xaaaa, d=0x%02x%02x%02x%02x (test 1)\n", @@ -2747,7 +2748,7 @@ test_conv_bitfield(void) H5Tset_precision(dt, 12); H5Tset_offset(dt, 10); buf[0] = 0xA8; buf[1] = 0x2A; buf[2] = buf[3] = 0; - if (H5Tconvert(st, dt, (hsize_t)1, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(st, dt, 1, buf, NULL, H5P_DEFAULT)<0) goto error; if (buf[0]!=0 || buf[1]!=0xA8 || buf[2]!=0x2A || buf[3]!=0) { H5_FAILED(); printf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 2)\n", @@ -2761,7 +2762,7 @@ test_conv_bitfield(void) */ H5Tset_pad(dt, H5T_PAD_ONE, H5T_PAD_ONE); buf[0] = 0xA8; buf[1] = 0x2A; buf[2] = buf[3] = 0; - if (H5Tconvert(st, dt, (hsize_t)1, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(st, dt, 1, buf, NULL, H5P_DEFAULT)<0) goto error; if (buf[0]!=0xff || buf[1]!=0xAB || buf[2]!=0xEA || buf[3]!=0xff) { H5_FAILED(); printf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 3)\n", @@ -2801,7 +2802,7 @@ test_conv_bitfield(void) */ static herr_t convert_opaque(hid_t UNUSED st, hid_t UNUSED dt, H5T_cdata_t *cdata, - hsize_t UNUSED nelmts, size_t UNUSED buf_stride, + size_t UNUSED nelmts, size_t UNUSED buf_stride, size_t UNUSED bkg_stride, void UNUSED *_buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plid) { @@ -2892,7 +2893,7 @@ opaque_check(int tag_it) /* Make sure that we can't convert between the types yet */ H5E_BEGIN_TRY { - status = H5Tconvert(st, dt, (hsize_t)OPAQUE_NELMTS, buf, NULL, H5P_DEFAULT); + status = H5Tconvert(st, dt, OPAQUE_NELMTS, buf, NULL, H5P_DEFAULT); } H5E_END_TRY; if (status>=0) { H5_FAILED(); @@ -2905,7 +2906,7 @@ opaque_check(int tag_it) goto error; /* Try the conversion again, this time it should work */ - if (H5Tconvert(st, dt, (hsize_t)OPAQUE_NELMTS, buf, NULL, H5P_DEFAULT)<0) goto error; + if (H5Tconvert(st, dt, OPAQUE_NELMTS, buf, NULL, H5P_DEFAULT)<0) goto error; if (saved+1 != num_opaque_conversions_g) { H5_FAILED(); printf(" unexpected number of opaque conversions\n"); @@ -2954,7 +2955,7 @@ test_conv_int (void) /* (unsigned)0x80000000 -> (unsigned)0xffff */ byte[0] = byte[1] = byte[2] = 0; byte[3] = 0x80; - if (H5Tconvert (H5T_STD_U32LE, H5T_STD_U16LE, (hsize_t)1, byte, NULL, H5P_DEFAULT)<0) { + if (H5Tconvert (H5T_STD_U32LE, H5T_STD_U16LE, 1, byte, NULL, H5P_DEFAULT)<0) { goto error; } if (byte[0]!=0xff || byte[1]!=0xff) { @@ -2967,7 +2968,7 @@ test_conv_int (void) /* (unsigned)0xffffffff -> (signed)0x7fff */ byte[0] = byte[1] = byte[2] = byte[3] = 0xff; - if (H5Tconvert (H5T_STD_U32LE, H5T_STD_I16LE, (hsize_t)1, byte, NULL, H5P_DEFAULT)<0) { + if (H5Tconvert (H5T_STD_U32LE, H5T_STD_I16LE, 1, byte, NULL, H5P_DEFAULT)<0) { goto error; } if (byte[0]!=0xff || byte[1]!=0x7f) { @@ -2980,7 +2981,7 @@ test_conv_int (void) /* (signed)0xffffffff -> (unsigned)0x0000 */ byte[0] = byte[1] = byte[2] = byte[3] = 0xff; - if (H5Tconvert (H5T_STD_I32LE, H5T_STD_U16LE, (hsize_t)1, byte, NULL, H5P_DEFAULT)<0) { + if (H5Tconvert (H5T_STD_I32LE, H5T_STD_U16LE, 1, byte, NULL, H5P_DEFAULT)<0) { goto error; } if (byte[0]!=0x00 || byte[1]!=0x00) { @@ -2994,7 +2995,7 @@ test_conv_int (void) /* (signed)0x7fffffff -> (unsigned)0xffff */ byte[0] = byte[1] = byte[2] = 0xff; byte[3] = 0x7f; - if (H5Tconvert (H5T_STD_I32LE, H5T_STD_U16LE, (hsize_t)1, byte, NULL, H5P_DEFAULT)<0) { + if (H5Tconvert (H5T_STD_I32LE, H5T_STD_U16LE, 1, byte, NULL, H5P_DEFAULT)<0) { goto error; } if (byte[0]!=0xff || byte[1]!=0xff) { @@ -3008,7 +3009,7 @@ test_conv_int (void) /* (signed)0x7fffffff -> (signed)0x7fff */ byte[0] = byte[1] = byte[2] = 0xff; byte[3] = 0x7f; - if (H5Tconvert (H5T_STD_I32LE, H5T_STD_I16LE, (hsize_t)1, byte, NULL, H5P_DEFAULT)<0) { + if (H5Tconvert (H5T_STD_I32LE, H5T_STD_I16LE, 1, byte, NULL, H5P_DEFAULT)<0) { goto error; } if (byte[0]!=0xff || byte[1]!=0x7f) { @@ -3022,7 +3023,7 @@ test_conv_int (void) /* (signed)0xbfffffff -> (signed)0x8000 */ byte[0] = byte[1] = byte[2] = 0xff; byte[3] = 0xbf; - if (H5Tconvert (H5T_STD_I32LE, H5T_STD_I16LE, (hsize_t)1, byte, NULL, H5P_DEFAULT)<0) { + if (H5Tconvert (H5T_STD_I32LE, H5T_STD_I16LE, 1, byte, NULL, H5P_DEFAULT)<0) { goto error; } if (byte[0]!=0x00 || byte[1]!=0x80) { @@ -3222,7 +3223,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) buf[j] = saved[j] = HDrand(); /* Perform the conversion */ - if (H5Tconvert(src, dst, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) + if (H5Tconvert(src, dst, nelmts, buf, NULL, H5P_DEFAULT)<0) goto error; /* Check the results from the library against hardware */ @@ -4049,7 +4050,7 @@ test_conv_int_2(void) * Conversion. If overlap calculations aren't right then an * assertion will fail in H5T_conv_i_i() */ - H5Tconvert(src_type, dst_type, (hsize_t)100, buf, NULL, H5P_DEFAULT); + H5Tconvert(src_type, dst_type, 100, buf, NULL, H5P_DEFAULT); H5Tclose(src_type); H5Tclose(dst_type); } @@ -4315,7 +4316,7 @@ test_conv_int_float(const char *name, hid_t src, hid_t dst) buf[j] = saved[j] = HDrand(); /* Perform the conversion */ - if (H5Tconvert(src, dst, (hsize_t)nelmts, buf, NULL, dxpl_id)<0) + if (H5Tconvert(src, dst, nelmts, buf, NULL, dxpl_id)<0) goto error; /* Check the results from the library against hardware */ @@ -5345,7 +5346,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst) } /* Perform the conversion in software */ - if (H5Tconvert(src, dst, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) + if (H5Tconvert(src, dst, nelmts, buf, NULL, H5P_DEFAULT)<0) goto error; /* Check the software results against the hardware */ @@ -6019,7 +6020,7 @@ main(void) /* Test hardware integer conversion functions */ nerrors += run_integer_tests("hw"); - + /* Test hardware floating-point conversion functions */ nerrors += test_conv_flt_1("hw", H5T_NATIVE_FLOAT, H5T_NATIVE_DOUBLE); nerrors += test_conv_flt_1("hw", H5T_NATIVE_DOUBLE, H5T_NATIVE_FLOAT); |