summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5A.c23
-rw-r--r--src/H5Dio.c30
-rw-r--r--src/H5FDmulti.c129
-rw-r--r--src/H5FDmulti.h2
-rw-r--r--src/H5Ofill.c2
-rw-r--r--src/H5Pdcpl.c2
-rw-r--r--src/H5Sprivate.h12
-rw-r--r--src/H5Sselect.c75
-rw-r--r--src/H5T.c50
-rw-r--r--src/H5Tconv.c304
-rw-r--r--src/H5Tnative.c2
-rw-r--r--src/H5Tpkg.h304
-rw-r--r--src/H5Tprivate.h2
-rw-r--r--src/H5Tpublic.h4
-rw-r--r--src/H5Tvlen.c48
-rw-r--r--test/dtypes.c673
16 files changed, 788 insertions, 874 deletions
diff --git a/src/H5A.c b/src/H5A.c
index ec8ea87..0222fa5 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -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,20 +631,19 @@ 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);
/* Get the memory and file datatype sizes */
src_type_size = H5T_get_size(mem_type);
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 */
@@ -760,7 +759,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 */
@@ -777,26 +776,24 @@ 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);
/* Get the memory and file datatype sizes */
src_type_size = H5T_get_size(attr->dt);
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 */
@@ -813,7 +810,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 */
ret_value=SUCCEED;
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 0190555..f490f95 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -257,7 +257,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 */
@@ -1052,7 +1052,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*/
@@ -1063,7 +1063,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)
@@ -1165,8 +1165,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 */
@@ -1296,7 +1295,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*/
@@ -1307,7 +1306,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)
@@ -1408,8 +1407,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 */
@@ -1537,9 +1535,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*/
@@ -1663,8 +1661,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 */
@@ -1846,9 +1843,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*/
@@ -2014,8 +2011,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 3f089a6..186d1af 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -26,6 +26,12 @@
#include <assert.h>
#include <stdlib.h>
+/* Disable certain warnings in PC-Lint: */
+/*lint --emacro( {534, 830}, H5P_DEFAULT, H5P_FILE_ACCESS, H5P_DATASET_XFER) */
+/*lint --emacro( {534, 830}, H5F_ACC_DEBUG, H5F_ACC_RDWR) */
+/*lint --emacro( {534, 830}, H5FD_MULTI) */
+/*lint -esym( 534, H5Eclear, H5Epush) */
+
#include "hdf5.h"
/*
@@ -35,17 +41,15 @@
*/
#define H5FD_MULTI_DEBUG
-/* Our versions of MIN and MAX */
+/* Our version of MAX */
#undef MAX
#define MAX(X,Y) ((X)>(Y)?(X):(Y))
-#undef MIN
-#define MIN(X,Y) ((X)<(Y)?(X):(Y))
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
-#define TRUE (!FALSE)
+#define TRUE 1
#endif
/* Loop through all mapped files */
@@ -60,6 +64,7 @@
assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES); \
if (_seen[LOOPVAR]++) continue;
+#ifdef LATER
#define MAPPED_MEMBERS(MAP,LOOPVAR) { \
H5FD_mem_t _unmapped, LOOPVAR; \
\
@@ -67,6 +72,7 @@
LOOPVAR = MAP[_unmapped]; \
if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=_unmapped; \
assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES);
+#endif /* LATER */
#define ALL_MEMBERS(LOOPVAR) { \
H5FD_mem_t LOOPVAR; \
@@ -312,8 +318,7 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id,
memb_addr[H5FD_MEM_SUPER] = 0;
memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/2;
- return H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr,
- TRUE);
+ return H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, TRUE);
}
@@ -400,7 +405,7 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id,
*/
herr_t
H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
- const hid_t *memb_fapl, const char **memb_name,
+ const hid_t *memb_fapl, const char * const *memb_name,
const haddr_t *memb_addr, hbool_t relax)
{
H5FD_multi_fapl_t fa;
@@ -420,18 +425,16 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
/* Check arguments and supply default values */
if(H5I_GENPROP_LST != H5Iget_type(fapl_id) ||
- TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
+ TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
H5Epush_ret(func, H5E_PLIST, H5E_BADVALUE, "not an access list", -1);
if (!memb_map) {
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
_memb_map[mt] = H5FD_MEM_DEFAULT;
- }
memb_map = _memb_map;
}
if (!memb_fapl) {
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
_memb_fapl[mt] = H5Pcreate(H5P_FILE_ACCESS);
- }
memb_fapl = _memb_fapl;
}
if (!memb_name) {
@@ -443,9 +446,8 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
memb_name = _memb_name_ptrs;
}
if (!memb_addr) {
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
_memb_addr[mt] = (mt?mt-1:0) * HADDR_MAX/H5FD_MEM_NTYPES;
- }
memb_addr = _memb_addr;
}
@@ -523,23 +525,21 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
H5Eclear();
if(H5I_GENPROP_LST != H5Iget_type(fapl_id) ||
- TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
+ TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
H5Epush_ret(func, H5E_PLIST, H5E_BADTYPE, "not an access list", -1);
if (H5FD_MULTI!=H5Pget_driver(fapl_id))
H5Epush_ret(func, H5E_PLIST, H5E_BADVALUE, "incorrect VFL driver", -1);
if (NULL==(fa=H5Pget_driver_info(fapl_id)))
H5Epush_ret(func, H5E_PLIST, H5E_BADVALUE, "bad VFL driver info", -1);
- if (memb_map) {
+ if (memb_map)
memcpy(memb_map, fa->memb_map, H5FD_MEM_NTYPES*sizeof(H5FD_mem_t));
- }
if (memb_fapl) {
for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- if (fa->memb_fapl[mt]>=0) {
+ if (fa->memb_fapl[mt]>=0)
memb_fapl[mt] = H5Pcopy(fa->memb_fapl[mt]);
- } else {
+ else
memb_fapl[mt] = fa->memb_fapl[mt]; /*default or bad ID*/
- }
}
}
if (memb_name) {
@@ -547,17 +547,14 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
if (fa->memb_name[mt]) {
memb_name[mt] = malloc(strlen(fa->memb_name[mt])+1);
strcpy(memb_name[mt], fa->memb_name[mt]);
- } else {
+ } else
memb_name[mt] = NULL;
- }
}
}
- if (memb_addr) {
+ if (memb_addr)
memcpy(memb_addr, fa->memb_addr, H5FD_MEM_NTYPES*sizeof(haddr_t));
- }
- if (relax) {
+ if (relax)
*relax = fa->relax;
- }
return 0;
}
@@ -655,11 +652,10 @@ H5Pget_dxpl_multi(hid_t dxpl_id, hid_t *memb_dxpl/*out*/)
if (memb_dxpl) {
for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- if (dx->memb_dxpl[mt]>=0) {
+ if (dx->memb_dxpl[mt]>=0)
memb_dxpl[mt] = H5Pcopy(dx->memb_dxpl[mt]);
- } else {
+ else
memb_dxpl[mt] = dx->memb_dxpl[mt]; /*default or bad ID */
- }
}
}
@@ -744,7 +740,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 */
@@ -756,9 +752,8 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/,
strcpy(name, "NCSAmulti");
assert(7==H5FD_MEM_NTYPES);
- for (m=H5FD_MEM_SUPER; m<H5FD_MEM_NTYPES; m=(H5FD_mem_t)(m+1)) {
- buf[m-1] = file->fa.memb_map[m];
- }
+ for (m=H5FD_MEM_SUPER; m<H5FD_MEM_NTYPES; m=(H5FD_mem_t)(m+1))
+ buf[m-1] = (unsigned char)file->fa.memb_map[m];
buf[7] = 0;
buf[8] = 0;
@@ -780,9 +775,8 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/,
nseen++;
} END_MEMBERS;
if (H5Tconvert(H5T_NATIVE_HADDR, H5T_STD_U64LE, nseen*2, buf+8, NULL,
- H5P_DEFAULT)<0) {
+ H5P_DEFAULT)<0)
H5Epush_ret(func, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1);
- }
/* Encode all name templates */
p = buf + 8 + nseen*2*8;
@@ -826,7 +820,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];
@@ -865,8 +859,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_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1);
@@ -920,7 +913,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
fprintf(stderr, "H5FD_MULTI: close member %d\n", (int)mt);
}
#endif
- H5FDclose(file->memb[mt]);
+ (void)H5FDclose(file->memb[mt]);
file->memb[mt] = NULL;
}
file->fa.memb_map[mt] = map[mt];
@@ -945,9 +938,9 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
/* Set the EOA marker for all open files */
UNIQUE_MEMBERS(file->fa.memb_map, mt) {
- if (file->memb[mt]) {
- H5FDset_eoa(file->memb[mt], memb_eoa[mt]);
- }
+ if (file->memb[mt])
+ if(H5FDset_eoa(file->memb[mt], memb_eoa[mt])<0)
+ H5Epush_ret(func, H5E_INTERNAL, H5E_CANTSET, "set_eoa() failed", -1);
} END_MEMBERS;
return 0;
@@ -1030,7 +1023,7 @@ H5FD_multi_fapl_copy(const void *_old_fa)
if (nerrors) {
for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- if (new_fa->memb_fapl[mt]>=0) H5Pclose(new_fa->memb_fapl[mt]);
+ if (new_fa->memb_fapl[mt]>=0) (void)H5Pclose(new_fa->memb_fapl[mt]);
if (new_fa->memb_name[mt]) free(new_fa->memb_name[mt]);
}
free(new_fa);
@@ -1061,15 +1054,20 @@ H5FD_multi_fapl_free(void *_fa)
{
H5FD_multi_fapl_t *fa = (H5FD_multi_fapl_t*)_fa;
H5FD_mem_t mt;
+ static const char *func="H5FD_multi_fapl_free"; /* Function Name for error reporting */
/* Clear the error stack */
H5Eclear();
for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- if (fa->memb_fapl[mt]>=0) H5Pclose(fa->memb_fapl[mt]);
- if (fa->memb_name[mt]) free(fa->memb_name[mt]);
+ if (fa->memb_fapl[mt]>=0)
+ if(H5Pclose(fa->memb_fapl[mt])<0)
+ H5Epush_ret(func, H5E_FILE, H5E_CLOSEERROR, "can't close property list", -1);
+ if (fa->memb_name[mt])
+ free(fa->memb_name[mt]);
}
free(fa);
+
return 0;
}
@@ -1114,7 +1112,7 @@ H5FD_multi_dxpl_copy(const void *_old_dx)
if (nerrors) {
for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
- H5Pclose(new_dx->memb_dxpl[mt]);
+ (void)H5Pclose(new_dx->memb_dxpl[mt]);
free(new_dx);
H5Epush_ret(func, H5E_INTERNAL, H5E_BADVALUE, "invalid freespace objects", NULL);
}
@@ -1143,13 +1141,15 @@ H5FD_multi_dxpl_free(void *_dx)
{
H5FD_multi_dxpl_t *dx = (H5FD_multi_dxpl_t*)_dx;
H5FD_mem_t mt;
+ static const char *func="H5FD_multi_dxpl_free"; /* Function Name for error reporting */
/* Clear the error stack */
H5Eclear();
for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
if (dx->memb_dxpl[mt]>=0)
- H5Pclose(dx->memb_dxpl[mt]);
+ if(H5Pclose(dx->memb_dxpl[mt])<0)
+ H5Epush_ret(func, H5E_FILE, H5E_CLOSEERROR, "can't close property list", -1);
free(dx);
return 0;
}
@@ -1200,29 +1200,29 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id,
H5Epush_ret(func, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", NULL);
if (H5P_FILE_ACCESS_DEFAULT==fapl_id || H5FD_MULTI!=H5Pget_driver(fapl_id)) {
close_fapl = fapl_id = H5Pcreate(H5P_FILE_ACCESS);
- H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE);
+ if(H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE)<0)
+ H5Epush_goto(func, H5E_FILE, H5E_CANTSET, "can't set property value", error);
}
fa = H5Pget_driver_info(fapl_id);
assert(fa);
ALL_MEMBERS(mt) {
file->fa.memb_map[mt] = fa->memb_map[mt];
file->fa.memb_addr[mt] = fa->memb_addr[mt];
- if (fa->memb_fapl[mt]>=0) {
+ if (fa->memb_fapl[mt]>=0)
file->fa.memb_fapl[mt] = H5Pcopy(fa->memb_fapl[mt]);
- } else {
+ else
file->fa.memb_fapl[mt] = fa->memb_fapl[mt];
- }
- if (fa->memb_name[mt]) {
+ if (fa->memb_name[mt])
file->fa.memb_name[mt] = my_strdup(fa->memb_name[mt]);
- } else {
+ else
file->fa.memb_name[mt] = NULL;
- }
} END_MEMBERS;
file->fa.relax = fa->relax;
file->flags = flags;
file->name = my_strdup(name);
if (close_fapl>=0)
- H5Pclose(close_fapl);
+ if(H5Pclose(close_fapl)<0)
+ H5Epush_goto(func, H5E_FILE, H5E_CLOSEERROR, "can't close property list", error);
/* Compute derived properties and open member files */
if (compute_next(file)<0)
@@ -1231,18 +1231,19 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id,
H5Epush_goto(func, H5E_INTERNAL, H5E_BADVALUE, "open_members() failed", error);
/* We must have opened at least the superblock file */
- if (H5FD_MEM_DEFAULT==(m=file->fa.memb_map[H5FD_MEM_SUPER])) {
+ if (H5FD_MEM_DEFAULT==(m=file->fa.memb_map[H5FD_MEM_SUPER]))
m = H5FD_MEM_SUPER;
- }
- if (NULL==file->memb[m]) goto error;
+ if (NULL==file->memb[m])
+ goto error;
+
return (H5FD_t*)file;
error:
/* Cleanup and fail */
if (file) {
ALL_MEMBERS(mt) {
- if (file->memb[mt]) H5FDclose(file->memb[mt]);
- if (file->fa.memb_fapl[mt]>=0) H5Pclose(file->fa.memb_fapl[mt]);
+ if (file->memb[mt]) (void)H5FDclose(file->memb[mt]);
+ if (file->fa.memb_fapl[mt]>=0) (void)H5Pclose(file->fa.memb_fapl[mt]);
if (file->fa.memb_name[mt]) free(file->fa.memb_name[mt]);
} END_MEMBERS;
if (file->name) free(file->name);
@@ -1305,7 +1306,7 @@ H5FD_multi_close(H5FD_t *_file)
/* Clean up other stuff */
ALL_MEMBERS(mt) {
- if (file->fa.memb_fapl[mt]>=0) H5Pclose(file->fa.memb_fapl[mt]);
+ if (file->fa.memb_fapl[mt]>=0) (void)H5Pclose(file->fa.memb_fapl[mt]);
if (file->fa.memb_name[mt]) free(file->fa.memb_name[mt]);
} END_MEMBERS;
free(file->name);
@@ -1800,9 +1801,9 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
if (HADDR_UNDEF!=file->memb_addr[mt]) {
haddr_t eoa = H5FDget_eoa(file->memb[mt]);
fprintf(stderr, " %6d %20llu %20llu %20llu %s\n",
- (int)mt, (unsigned long long)(file->memb_addr[mt]),
- (unsigned long long)eoa,
- (unsigned long long)(file->memb_next[mt]),
+ (int)mt, (unsigned long_long)(file->memb_addr[mt]),
+ (unsigned long_long)eoa,
+ (unsigned long_long)(file->memb_next[mt]),
file->memb_name[mt]);
}
}
diff --git a/src/H5FDmulti.h b/src/H5FDmulti.h
index 8768390..959a019 100644
--- a/src/H5FDmulti.h
+++ b/src/H5FDmulti.h
@@ -32,7 +32,7 @@ extern "C" {
#endif
H5_DLL hid_t H5FD_multi_init(void);
H5_DLL herr_t H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
- const hid_t *memb_fapl, const char **memb_name,
+ const hid_t *memb_fapl, const char * const *memb_name,
const haddr_t *memb_addr, hbool_t relax);
H5_DLL herr_t H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
hid_t *memb_fapl/*out*/, char **memb_name/*out*/,
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index b0716f6..d7f338b 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -902,7 +902,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 8d71e0b..6466c3e 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -1300,7 +1300,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 ca6bb7d..891e812 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -1345,15 +1345,28 @@ HDfprintf(stderr,"%s: Entering\n",FUNC);
if (space1->extent.rank!=space2->extent.rank)
HGOTO_DONE(FALSE);
+#ifdef QAK
+HDfprintf(stderr,"%s: Check 0.5\n",FUNC);
+HDfprintf(stderr,"%s: space1 selection type=%d\n",FUNC,(int)H5S_GET_SELECT_TYPE(space1));
+HDfprintf(stderr,"%s: space1->select.num_elem=%Hd\n",FUNC,space1->select.num_elem);
+HDfprintf(stderr,"%s: space2 selection type=%d\n",FUNC,(int)H5S_GET_SELECT_TYPE(space2));
+HDfprintf(stderr,"%s: space2->select.num_elem=%Hd\n",FUNC,space2->select.num_elem);
+#endif /* QAK */
/* Check for different number of elements selected */
if(H5S_GET_SELECT_NPOINTS(space1)!=H5S_GET_SELECT_NPOINTS(space2))
HGOTO_DONE(FALSE);
+#ifdef QAK
+HDfprintf(stderr,"%s: Check 1.0\n",FUNC);
+#endif /* QAK */
/* Check for "easy" cases before getting into generalized block iteration code */
if(H5S_GET_SELECT_TYPE(space1)==H5S_SEL_ALL && H5S_GET_SELECT_TYPE(space2)==H5S_SEL_ALL) {
hsize_t dims1[H5O_LAYOUT_NDIMS]; /* End point of selection block in dataspace #1 */
hsize_t dims2[H5O_LAYOUT_NDIMS]; /* End point of selection block in dataspace #2 */
+#ifdef QAK
+HDfprintf(stderr,"%s: Check 2.0\n",FUNC);
+#endif /* QAK */
if(H5S_get_simple_extent_dims(space1, dims1, NULL)<0)
HGOTO_ERROR (H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get dimensionality");
if(H5S_get_simple_extent_dims(space2, dims2, NULL)<0)
@@ -1365,11 +1378,17 @@ HDfprintf(stderr,"%s: Entering\n",FUNC);
HGOTO_DONE(FALSE);
} /* end if */
else if(H5S_GET_SELECT_TYPE(space1)==H5S_SEL_NONE || H5S_GET_SELECT_TYPE(space2)==H5S_SEL_NONE) {
+#ifdef QAK
+HDfprintf(stderr,"%s: Check 3.0\n",FUNC);
+#endif /* QAK */
HGOTO_DONE(TRUE);
} /* end if */
else if((H5S_GET_SELECT_TYPE(space1)==H5S_SEL_HYPERSLABS && space1->select.sel_info.hslab->diminfo_valid)
&& (H5S_GET_SELECT_TYPE(space2)==H5S_SEL_HYPERSLABS && space2->select.sel_info.hslab->diminfo_valid)) {
+#ifdef QAK
+HDfprintf(stderr,"%s: Check 4.0\n",FUNC);
+#endif /* QAK */
/* Check that the shapes are the same */
for (u=0; u<space1->extent.rank; u++) {
if(space1->select.sel_info.hslab->opt_diminfo[u].stride!=space2->select.sel_info.hslab->opt_diminfo[u].stride)
@@ -1642,7 +1661,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 */
@@ -1654,7 +1673,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 */
@@ -1683,13 +1701,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 */
@@ -1705,7 +1720,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:
@@ -1742,10 +1757,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 */
@@ -1757,10 +1772,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);
@@ -1785,13 +1799,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 */
@@ -1807,7 +1818,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:
@@ -1840,7 +1851,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 */
@@ -1850,7 +1861,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 */
@@ -1877,13 +1887,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 */
@@ -1898,7 +1905,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:
@@ -1931,9 +1938,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 */
@@ -1943,11 +1950,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);
@@ -1970,13 +1976,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 */
@@ -1991,7 +1994,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:
diff --git a/src/H5T.c b/src/H5T.c
index b8d4e57..a406f6c 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -844,7 +844,7 @@ H5T_init_interface(void)
/* 8-byte big-endian unsigned integer */
H5T_INIT_TYPE(UINTBE,H5T_STD_U64BE_g,COPY,native_uint,SET,8)
std_u64be=dt; /* Keep type for later */
-
+
/*------------------------------------------------------------
* Little- & Big-endian bitfields
*------------------------------------------------------------
@@ -1182,7 +1182,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 "
@@ -1856,13 +1856,13 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Tget_size
*
- * Purpose: Determines the total size of a data type in bytes.
+ * Purpose: Determines the total size of a datatype in bytes.
*
- * Return: Success: Size of the data type in bytes. The size of
- * data type is the size of an instance of that
- * data type.
+ * Return: Success: Size of the datatype in bytes. The size of
+ * datatype is the size of an instance of that
+ * datatype.
*
- * Failure: 0 (valid data types are never zero size)
+ * Failure: 0 (valid datatypes are never zero size)
*
* Programmer: Robb Matzke
* Monday, December 8, 1997
@@ -1882,7 +1882,7 @@ H5Tget_size(hid_t type_id)
/* Check args */
if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a data type");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype");
/* size */
ret_value = H5T_get_size(dt);
@@ -1895,12 +1895,12 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Tset_size
*
- * Purpose: Sets the total size in bytes for a data type (this operation
- * is not permitted on reference data types). If the size is
- * decreased so that the significant bits of the data type
+ * Purpose: Sets the total size in bytes for a datatype (this operation
+ * is not permitted on reference datatypes). If the size is
+ * decreased so that the significant bits of the datatype
* extend beyond the edge of the new size, then the `offset'
* property is decreased toward zero. If the `offset' becomes
- * zero and the significant bits of the data type still hang
+ * zero and the significant bits of the datatype still hang
* over the edge of the new size, then the number of significant
* bits is decreased.
*
@@ -2092,7 +2092,7 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
if (new_path != H5T_g.path[i])
H5T_g.path[i]->cdata.recalc = TRUE;
} /* end for */
- } /* end if */
+ } /* end if */
} else {
/* Add function to end of soft list */
if (H5T_g.nsoft>=H5T_g.asoft) {
@@ -2131,7 +2131,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;
@@ -2158,7 +2158,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 "
@@ -2319,7 +2319,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)) {
@@ -2463,7 +2463,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 */
@@ -2620,8 +2620,8 @@ H5T_create(H5T_class_t type, size_t size)
/* Initialize the tag in case it's not set later. A null tag will
* cause problems for later operations. */
dt->u.opaque.tag = H5MM_strdup("");
-
break;
+
case H5T_ENUM:
if (sizeof(char)==size) {
subtype = H5T_NATIVE_SCHAR_g;
@@ -2641,7 +2641,7 @@ H5T_create(H5T_class_t type, size_t size)
dt->type = type;
if (NULL==(dt->parent=H5T_copy(H5I_object(subtype), H5T_COPY_ALL)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy base data type");
- break;
+ break;
case H5T_VLEN: /* Variable length datatype */
HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, NULL, "base type required - use H5Tvlen_create()");
@@ -3647,7 +3647,7 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2)
case H5T_OPAQUE:
if(dt1->u.opaque.tag && dt2->u.opaque.tag) {
HGOTO_DONE(HDstrcmp(dt1->u.opaque.tag,dt2->u.opaque.tag));
- }
+ }
case H5T_ARRAY:
if (dt1->u.array.ndims < dt2->u.array.ndims)
HGOTO_DONE(-1);
@@ -3854,7 +3854,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)) {
@@ -3942,7 +3942,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);
@@ -3971,7 +3971,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(); /*ignore the error*/
} else {
@@ -4014,7 +4014,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)) {
@@ -4160,7 +4160,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 d1fef96..865f564 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -24,7 +24,7 @@
#include "H5private.h" /*generic functions */
#include "H5Eprivate.h" /*error handling */
-#include "H5FLprivate.h" /*Free Lists */
+#include "H5FLprivate.h" /*Free Lists */
#include "H5Iprivate.h" /*ID functions */
#include "H5MMprivate.h" /*memory management */
#include "H5Pprivate.h" /* Property Lists */
@@ -47,8 +47,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 */
@@ -556,7 +556,7 @@ H5FL_BLK_DEFINE_STATIC(array_seq);
*/
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)
{
@@ -605,14 +605,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);
@@ -988,14 +988,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 */
@@ -1085,21 +1085,21 @@ 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 UNUSED 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 */
size_t msb_pad_offset; /*offset for dest MSB padding */
size_t i;
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5T_conv_b_b, FAIL);
@@ -1442,7 +1442,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)
{
@@ -1456,7 +1456,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;
int i; /*counters */
H5T_conv_struct_t *priv = (H5T_conv_struct_t *)(cdata->priv);
herr_t ret_value=SUCCEED; /* Return value */
@@ -1547,7 +1547,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[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+src_memb->offset, xbkg+dst_memb->offset,
dxpl_id)<0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert compound data type member");
@@ -1577,7 +1577,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");
@@ -1675,7 +1675,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 */
@@ -1688,7 +1688,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 */
int i; /*counters */
H5T_conv_struct_t *priv = NULL; /*private data */
herr_t ret_value=SUCCEED; /* Return value */
@@ -2043,7 +2043,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)
{
@@ -2052,9 +2052,9 @@ 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);
- herr_t ret_value=SUCCEED; /* Return value */
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5T_conv_enum, FAIL);
@@ -2221,7 +2221,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)
{
@@ -2239,16 +2239,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);
@@ -2393,9 +2392,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 */
@@ -2428,9 +2426,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");
}
@@ -2441,30 +2438,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));
@@ -2530,7 +2529,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)
{
@@ -2541,7 +2540,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 */
@@ -2638,7 +2637,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 */
@@ -2690,21 +2689,21 @@ 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 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 */
+ 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 dbuf[64]; /*temp destination buffer */
size_t first;
ssize_t sfirst; /*a signed version of `first' */
- size_t i; /* Local index variables */
+ size_t i; /*Local index variables */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5T_conv_i_i, FAIL);
@@ -3017,7 +3016,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 UNUSED dxpl_id)
{
@@ -3026,10 +3025,10 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
H5T_t *dst_p; /*destination data type */
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 */
+ int direction; /*forward or backward traversal */
+ 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 dbuf[64]; /*temp destination buffer */
@@ -3042,9 +3041,8 @@ 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 */
-
- herr_t ret_value=SUCCEED; /* Return value */
+ size_t implied; /*destination implied bits */
+ herr_t ret_value=SUCCEED; /*return value */
FUNC_ENTER_NOAPI(H5T_conv_f_f, FAIL);
@@ -3444,15 +3442,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. */
@@ -3667,7 +3665,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)
{
@@ -3700,7 +3698,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)
{
@@ -3733,7 +3731,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)
{
@@ -3766,7 +3764,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)
{
@@ -3799,7 +3797,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)
{
@@ -3832,7 +3830,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)
{
@@ -3865,7 +3863,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 */
@@ -3897,7 +3895,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 */
@@ -3929,7 +3927,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 */
@@ -3961,7 +3959,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 */
@@ -3993,7 +3991,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 */
@@ -4025,7 +4023,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)
{
@@ -4058,7 +4056,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 */
@@ -4090,7 +4088,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)
{
@@ -4123,7 +4121,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)
{
@@ -4156,7 +4154,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)
{
@@ -4189,7 +4187,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)
{
@@ -4222,7 +4220,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)
{
@@ -4255,7 +4253,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)
{
@@ -4288,7 +4286,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)
{
@@ -4321,7 +4319,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)
{
@@ -4354,7 +4352,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)
{
@@ -4387,7 +4385,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)
{
@@ -4420,7 +4418,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)
{
@@ -4453,7 +4451,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)
{
@@ -4486,7 +4484,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)
{
@@ -4519,7 +4517,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)
{
@@ -4552,7 +4550,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)
{
@@ -4585,7 +4583,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)
{
@@ -4618,7 +4616,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)
{
@@ -4651,7 +4649,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)
{
@@ -4684,7 +4682,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)
{
@@ -4717,7 +4715,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)
{
@@ -4750,7 +4748,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)
{
@@ -4783,7 +4781,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)
{
@@ -4816,7 +4814,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)
{
@@ -4849,7 +4847,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)
{
@@ -4882,7 +4880,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)
{
@@ -4915,7 +4913,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)
{
@@ -4948,7 +4946,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)
{
@@ -4981,7 +4979,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)
{
@@ -5014,7 +5012,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)
{
@@ -5047,7 +5045,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)
{
@@ -5080,7 +5078,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)
{
@@ -5113,7 +5111,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 */
@@ -5145,7 +5143,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 */
@@ -5177,7 +5175,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 */
@@ -5209,7 +5207,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 */
@@ -5241,7 +5239,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 */
@@ -5273,7 +5271,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 */
@@ -5305,7 +5303,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 */
@@ -5337,7 +5335,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 */
@@ -5369,7 +5367,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 */
@@ -5401,7 +5399,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)
{
@@ -5434,7 +5432,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 */
@@ -5466,7 +5464,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 */
@@ -5498,7 +5496,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)
{
@@ -5531,7 +5529,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)
{
@@ -5564,7 +5562,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 */
@@ -5596,7 +5594,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)
{
@@ -5629,7 +5627,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 */
@@ -5661,7 +5659,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)
{
@@ -5694,7 +5692,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 */
@@ -5726,7 +5724,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 */
@@ -5758,7 +5756,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 */
@@ -5790,7 +5788,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 */
@@ -5822,7 +5820,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 */
@@ -5854,7 +5852,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 */
@@ -5886,7 +5884,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 */
@@ -5918,7 +5916,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)
{
@@ -5951,7 +5949,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)
{
@@ -5984,7 +5982,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)
{
@@ -6017,7 +6015,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)
{
@@ -6050,7 +6048,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)
{
@@ -6083,7 +6081,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)
{
@@ -6116,7 +6114,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)
{
@@ -6149,7 +6147,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)
{
@@ -6182,7 +6180,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)
{
@@ -6215,7 +6213,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)
{
@@ -6248,7 +6246,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)
{
@@ -6281,7 +6279,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 */
@@ -6313,7 +6311,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 */
@@ -6345,7 +6343,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 */
@@ -6377,7 +6375,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)
{
@@ -6410,7 +6408,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 */
@@ -6442,7 +6440,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)
{
@@ -6475,7 +6473,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)
{
@@ -6508,7 +6506,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)
{
@@ -6541,7 +6539,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)
{
@@ -6574,7 +6572,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)
{
@@ -6610,7 +6608,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)
{
@@ -6649,7 +6647,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)
{
@@ -6686,14 +6684,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 */
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index 97e5587..929ae43 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -366,7 +366,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 dda6481..72bcd5f 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -49,7 +49,7 @@
#define H5T_NAMELEN 32
/* Macro to ease detecting "complex" datatypes (i.e. those with base types or fields) */
-#define H5T_IS_COMPLEX(t) ((t)==H5T_COMPOUND || (t)==H5T_ENUM || (t)==H5T_VLEN || (t)==H5T_ARRAY)
+#define H5T_IS_COMPLEX(t) ((t)==H5T_COMPOUND || (t)==H5T_ENUM || (t)==H5T_VLEN || (t)==H5T_ARRAY)
/* Macro to ease detecting fixed or variable-length "string" datatypes */
#define H5T_IS_STRING(dt) (H5T_STRING == (dt)->type || (H5T_VLEN == (dt)->type && H5T_VLEN_STRING == (dt)->u.vlen.type))
@@ -132,11 +132,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 */
@@ -328,524 +328,524 @@ 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,
+ 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,
+ 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_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 b28c01f..d274f30 100644
--- a/src/H5Tprivate.h
+++ b/src/H5Tprivate.h
@@ -78,7 +78,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 6842b63..8097546 100644
--- a/src/H5Tpublic.h
+++ b/src/H5Tpublic.h
@@ -183,7 +183,7 @@ extern "C" {
/* All data type 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);
/*
@@ -555,7 +555,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);
H5_DLL H5T_overflow_t H5Tget_overflow(void);
H5_DLL herr_t H5Tset_overflow(H5T_overflow_t func);
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 1a231d4..56e18f1 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -40,23 +40,23 @@ static herr_t H5T_init_vlen_interface(void);
/* Local functions */
static htri_t H5T_vlen_set_loc(H5T_t *dt, H5F_t *f, H5T_vlen_loc_t loc);
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/test/dtypes.c b/test/dtypes.c
index 5f899e9..6dd3a46 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -112,8 +112,8 @@ static int num_opaque_conversions_g = 0;
#endif
/* Allocates memory aligned on a certain boundary. */
-#define aligned_malloc(Z) ((void*)((char*)malloc(ALIGNMENT+Z)+ALIGNMENT))
-#define aligned_free(M) free((char*)(M)-ALIGNMENT)
+#define aligned_malloc(Z) ((void*)((char*)HDmalloc(ALIGNMENT+Z)+ALIGNMENT))
+#define aligned_free(M) HDfree((char*)(M)-ALIGNMENT)
void some_dummy_func(float x);
static int opaque_check(int tag_it);
@@ -137,12 +137,12 @@ static void
fpe_handler(int UNUSED signo)
{
SKIPPED();
- puts(" Test skipped due to SIGFPE.");
+ HDputs(" Test skipped due to SIGFPE.");
#ifndef HANDLE_SIGFPE
- puts(" Remaining tests could not be run.");
- puts(" Please turn off SIGFPE on overflows and try again.");
+ HDputs(" Remaining tests could not be run.");
+ HDputs(" Please turn off SIGFPE on overflows and try again.");
#endif
- exit(255);
+ HDexit(255);
}
@@ -225,34 +225,35 @@ generates_sigfpe(void)
unsigned char *dp = (unsigned char*)&d;
float f;
- fflush(stdout);
- fflush(stderr);
+ HDfflush(stdout);
+ HDfflush(stderr);
if ((pid=fork())<0) {
- perror("fork");
- exit(1);
+ HDperror("fork");
+ HDexit(1);
} else if (0==pid) {
for (i=0; i<2000; i++) {
- for (j=0; j<sizeof(double); j++) dp[j] = rand();
+ for (j=0; j<sizeof(double); j++) dp[j] = HDrand();
f = (float)d;
some_dummy_func((float)f);
}
- exit(0);
+ HDexit(0);
}
- while (pid!=waitpid(pid, &status, 0)) /*void*/;
+ while (pid!=waitpid(pid, &status, 0))
+ /*void*/;
if (WIFEXITED(status) && 0==WEXITSTATUS(status)) {
- puts("Floating-point overflow cases will be tested.");
+ HDputs("Floating-point overflow cases will be tested.");
skip_overflow_tests_g = FALSE;
} else if (WIFSIGNALED(status) && SIGFPE==WTERMSIG(status)) {
- puts("Floating-point overflow cases cannot be safely tested.");
+ HDputs("Floating-point overflow cases cannot be safely tested.");
skip_overflow_tests_g = TRUE;
/* delete the core dump file that SIGFPE may have created */
- unlink("core");
+ HDunlink("core");
}
#else
- puts("Cannot determine if floating-point overflows generate a SIGFPE;");
- puts("assuming yes.");
- puts("Overflow cases will not be tested.");
+ HDputs("Cannot determine if floating-point overflows generate a SIGFPE;");
+ HDputs("assuming yes.");
+ HDputs("Overflow cases will not be tested.");
skip_overflow_tests_g = TRUE;
#endif
}
@@ -326,13 +327,13 @@ test_classes(void)
if ((tcls=H5Tget_class(H5T_NATIVE_INT))<0) goto error;
if (H5T_INTEGER!=tcls) {
H5_FAILED();
- puts(" Invalid type class for H5T_NATIVE_INT");
+ HDputs(" Invalid type class for H5T_NATIVE_INT");
goto error;
}
if ((tcls=H5Tget_class(H5T_NATIVE_DOUBLE))<0) goto error;
if (H5T_FLOAT!=tcls) {
H5_FAILED();
- puts(" Invalid type class for H5T_NATIVE_DOUBLE");
+ HDputs(" Invalid type class for H5T_NATIVE_DOUBLE");
goto error;
}
PASSED();
@@ -376,7 +377,7 @@ test_copy(void)
} H5E_END_TRY;
if (status>=0) {
H5_FAILED();
- puts (" Should not be able to close a predefined type!");
+ HDputs (" Should not be able to close a predefined type!");
goto error;
}
@@ -600,7 +601,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;
@@ -613,7 +614,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;
@@ -648,10 +649,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 ||
@@ -717,7 +718,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;
@@ -730,7 +731,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;
@@ -763,11 +764,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 ||
@@ -835,7 +836,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;
@@ -848,7 +849,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;
@@ -883,11 +884,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 ||
@@ -1004,7 +1005,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 */
@@ -1066,7 +1067,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;
@@ -1077,7 +1078,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;
@@ -1100,13 +1101,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 ||
@@ -1245,7 +1246,7 @@ test_compound_7(void)
/* Increase compound type size and try inserting field again */
if(H5Tset_size(tid2, sizeof(struct s2))<0) {
H5_FAILED();
- printf("Incorrect size for struct 2\n");
+ printf("Can't increase size for compound type\n");
goto error;
} /* end if */
@@ -1874,7 +1875,7 @@ test_transient (hid_t fapl)
} H5E_END_TRY;
if (status>=0) {
H5_FAILED();
- puts (" Predefined types should not be modifiable!");
+ HDputs (" Predefined types should not be modifiable!");
goto error;
}
H5E_BEGIN_TRY {
@@ -1882,7 +1883,7 @@ test_transient (hid_t fapl)
} H5E_END_TRY;
if (status>=0) {
H5_FAILED();
- puts (" Predefined types should not be closable!");
+ HDputs (" Predefined types should not be closable!");
goto error;
}
@@ -1896,7 +1897,7 @@ test_transient (hid_t fapl)
} H5E_END_TRY;
if (status>=0) {
H5_FAILED();
- puts (" Attributes should not be allowed for transient types!");
+ HDputs (" Attributes should not be allowed for transient types!");
goto error;
}
@@ -1913,7 +1914,7 @@ test_transient (hid_t fapl)
} H5E_END_TRY;
if (status>=0) {
H5_FAILED();
- puts (" Dataset data types should not be modifiable!");
+ HDputs (" Dataset data types should not be modifiable!");
goto error;
}
if (H5Tclose (t2)<0) goto error;
@@ -1930,7 +1931,7 @@ test_transient (hid_t fapl)
} H5E_END_TRY;
if (status>=0) {
H5_FAILED();
- puts (" Dataset data types should not be modifiable!");
+ HDputs (" Dataset data types should not be modifiable!");
goto error;
}
if (H5Tclose (t2)<0) goto error;
@@ -2004,7 +2005,7 @@ test_named (hid_t fapl)
} H5E_END_TRY;
if (status>=0) {
H5_FAILED();
- puts (" Predefined types should not be committable!");
+ HDputs (" Predefined types should not be committable!");
goto error;
}
@@ -2014,7 +2015,7 @@ test_named (hid_t fapl)
if ((status=H5Tcommitted (type))<0) goto error;
if (0==status) {
H5_FAILED();
- puts (" H5Tcommitted() returned false!");
+ HDputs (" H5Tcommitted() returned false!");
goto error;
}
@@ -2024,7 +2025,7 @@ test_named (hid_t fapl)
} H5E_END_TRY;
if (status>=0) {
H5_FAILED();
- puts (" Committed type is not constant!");
+ HDputs (" Committed type is not constant!");
goto error;
}
@@ -2034,7 +2035,7 @@ test_named (hid_t fapl)
} H5E_END_TRY;
if (status>=0) {
H5_FAILED();
- puts (" Committed types should not be recommitted!");
+ HDputs (" Committed types should not be recommitted!");
goto error;
}
@@ -2053,7 +2054,7 @@ test_named (hid_t fapl)
if ((status=H5Tcommitted (t2))<0) goto error;
if (status) {
H5_FAILED();
- puts (" Copying a named type should result in a transient type!");
+ HDputs (" Copying a named type should result in a transient type!");
goto error;
}
if (H5Tset_precision (t2, 256)<0) goto error;
@@ -2067,7 +2068,7 @@ test_named (hid_t fapl)
if ((status=H5Tcommitted (type))<0) goto error;
if (!status) {
H5_FAILED();
- puts (" Opened named types should be named types!");
+ HDputs (" Opened named types should be named types!");
goto error;
}
@@ -2081,7 +2082,7 @@ test_named (hid_t fapl)
if ((status=H5Tcommitted (t2))<0) goto error;
if (!status) {
H5_FAILED();
- puts (" Dataset type should be a named type!");
+ HDputs (" Dataset type should be a named type!");
goto error;
}
@@ -2095,7 +2096,7 @@ test_named (hid_t fapl)
if ((status=H5Tcommitted (t2))<0) goto error;
if (!status) {
H5_FAILED();
- puts (" Dataset type should be a named type!");
+ HDputs (" Dataset type should be a named type!");
goto error;
}
@@ -2116,7 +2117,7 @@ test_named (hid_t fapl)
if ((status=H5Tcommitted (t2))<0) goto error;
if (!status) {
H5_FAILED();
- puts (" Dataset type should be a named type!");
+ HDputs (" Dataset type should be a named type!");
goto error;
}
if (H5Tclose (t2)<0) goto error;
@@ -2207,21 +2208,21 @@ test_conv_str_1(void)
*/
src_type = mkstr(10, H5T_STR_NULLTERM);
dst_type = mkstr(5, H5T_STR_NULLTERM);
- buf = calloc(2, 10);
+ 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();
- puts(" Truncated C-string test 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();
- puts(" Extended C-string test failed");
+ HDputs(" Extended C-string test failed");
goto error;
}
- free(buf);
+ HDfree(buf);
if (H5Tclose(src_type)<0) goto error;
if (H5Tclose(dst_type)<0) goto error;
@@ -2230,21 +2231,21 @@ test_conv_str_1(void)
*/
src_type = mkstr(10, H5T_STR_NULLPAD);
dst_type = mkstr(5, H5T_STR_NULLPAD);
- buf = calloc(2, 10);
+ 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();
- puts(" Truncated C buffer test 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();
- puts(" Extended C buffer test failed");
+ HDputs(" Extended C buffer test failed");
goto error;
}
- free(buf);
+ HDfree(buf);
if (H5Tclose(src_type)<0) goto error;
if (H5Tclose(dst_type)<0) goto error;
@@ -2253,21 +2254,21 @@ test_conv_str_1(void)
*/
src_type = mkstr(10, H5T_STR_SPACEPAD);
dst_type = mkstr(5, H5T_STR_SPACEPAD);
- buf = calloc(2, 10);
+ 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();
- puts(" Truncated Fortran-string test 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();
- puts(" Extended Fortran-string test failed");
+ HDputs(" Extended Fortran-string test failed");
goto error;
}
- free(buf);
+ HDfree(buf);
if (H5Tclose(src_type)<0) goto error;
if (H5Tclose(dst_type)<0) goto error;
@@ -2279,31 +2280,31 @@ test_conv_str_1(void)
*/
src_type = mkstr(10, H5T_STR_NULLTERM);
dst_type = mkstr(10, H5T_STR_NULLTERM);
- buf = calloc(2, 10);
+ 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();
- puts(" Non-terminated string test 1");
+ HDputs(" Non-terminated string test 1");
goto error;
}
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();
- puts(" Non-terminated string test 2");
+ 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();
- puts(" Non-terminated string test 2");
+ HDputs(" Non-terminated string test 2");
goto error;
}
- free(buf);
+ HDfree(buf);
if (H5Tclose(src_type)<0) goto error;
if (H5Tclose(dst_type)<0) goto error;
@@ -2312,33 +2313,33 @@ test_conv_str_1(void)
*/
src_type = mkstr(10, H5T_STR_NULLTERM);
dst_type = mkstr(10, H5T_STR_SPACEPAD);
- buf = calloc(2, 10);
+ 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();
- puts(" C string to Fortran test 1");
+ 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();
- puts(" Fortran to C string test 1");
+ HDputs(" Fortran to C string test 1");
goto error;
}
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();
- puts(" C string to Fortran test 2");
+ 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();
- puts(" Fortran to C string test 2");
+ HDputs(" Fortran to C string test 2");
goto error;
}
if (H5Tclose(src_type)<0) goto error;
@@ -2346,19 +2347,19 @@ 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();
- puts(" C string to Fortran test 3");
+ 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();
- puts(" Fortran to C string test 3");
+ HDputs(" Fortran to C string test 3");
goto error;
}
- free(buf);
+ HDfree(buf);
if (H5Tclose(src_type)<0) goto error;
if (H5Tclose(dst_type)<0) goto error;
@@ -2367,33 +2368,33 @@ test_conv_str_1(void)
*/
src_type = mkstr(10, H5T_STR_NULLPAD);
dst_type = mkstr(10, H5T_STR_SPACEPAD);
- buf = calloc(2, 10);
+ 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();
- puts(" C buffer to Fortran test 1");
+ 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();
- puts(" Fortran to C buffer test 1");
+ HDputs(" Fortran to C buffer test 1");
goto error;
}
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();
- puts(" C buffer to Fortran test 2");
+ 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();
- puts(" Fortran to C buffer test 2");
+ HDputs(" Fortran to C buffer test 2");
goto error;
}
if (H5Tclose(src_type)<0) goto error;
@@ -2401,19 +2402,19 @@ 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();
- puts(" C buffer to Fortran test 3");
+ 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();
- puts(" Fortran to C buffer test 3");
+ HDputs(" Fortran to C buffer test 3");
goto error;
}
- free(buf);
+ HDfree(buf);
if (H5Tclose(src_type)<0) goto error;
if (H5Tclose(dst_type)<0) goto error;
@@ -2457,13 +2458,13 @@ test_conv_str_2(void)
*/
c_type = mkstr(8, H5T_STR_NULLPAD);
f_type = mkstr(8, H5T_STR_SPACEPAD);
- buf = calloc(nelmts, 8);
+ buf = HDcalloc(nelmts, 8);
for (i=0; i<nelmts; i++) {
- nchars = rand() % 8;
- for (j=0; j<nchars; j++) {
- buf[i*8+j] = 'a' + rand()%26;
- }
- while (j<nchars) buf[i*8+j++] = '\0';
+ nchars = HDrand() % 8;
+ for (j=0; j<nchars; j++)
+ buf[i*8+j] = 'a' + HDrand()%26;
+ while (j<nchars)
+ buf[i*8+j++] = '\0';
}
/* Do the conversions */
@@ -2475,15 +2476,17 @@ test_conv_str_2(void)
sprintf(s, "Testing random string conversion speed");
}
printf("%-70s", s);
- fflush(stdout);
- if (H5Tconvert(c_type, f_type, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
- if (H5Tconvert(f_type, c_type, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
+ HDfflush(stdout);
+ if (H5Tconvert(c_type, f_type, nelmts, buf, NULL, H5P_DEFAULT)<0)
+ goto error;
+ if (H5Tconvert(f_type, c_type, nelmts, buf, NULL, H5P_DEFAULT)<0)
+ goto error;
PASSED();
}
ret_value = 0;
error:
- if (buf) free(buf);
+ if (buf) HDfree(buf);
reset_hdf5();
return ret_value;
}
@@ -2508,7 +2511,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];
@@ -2525,8 +2529,9 @@ test_conv_enum_1(void)
}
/* Initialize the buffer */
- buf = malloc(nelmts*MAX(H5Tget_size(t1), H5Tget_size(t2)));
- for (i=0; i<nelmts; i++) buf[i] = rand() % 26;
+ buf = HDmalloc(nelmts*MAX(H5Tget_size(t1), H5Tget_size(t2)));
+ for (i=0; i<(int)nelmts; i++)
+ buf[i] = HDrand() % 26;
/* Conversions */
for (i=0; i<ntests; i++) {
@@ -2537,8 +2542,8 @@ test_conv_enum_1(void)
sprintf(s, "Testing random enum conversion O(N)");
}
printf("%-70s", s);
- fflush(stdout);
- if (H5Tconvert(t1, t2, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
+ HDfflush(stdout);
+ if (H5Tconvert(t1, t2, nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
PASSED();
}
@@ -2550,8 +2555,8 @@ test_conv_enum_1(void)
sprintf(s, "Testing random enum conversion O(N log N)");
}
printf("%-70s", s);
- fflush(stdout);
- if (H5Tconvert(t2, t1, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
+ HDfflush(stdout);
+ if (H5Tconvert(t2, t1, nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
PASSED();
}
ret_value = 0;
@@ -2559,7 +2564,7 @@ test_conv_enum_1(void)
error:
H5Tclose(t1);
H5Tclose(t2);
- if (buf) free(buf);
+ if (buf) HDfree(buf);
reset_hdf5();
return ret_value;
}
@@ -2621,7 +2626,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++) {
@@ -2685,7 +2690,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",
@@ -2704,7 +2709,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",
@@ -2718,7 +2723,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",
@@ -2758,7 +2763,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)
{
@@ -2849,7 +2854,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();
@@ -2862,7 +2867,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");
@@ -2911,7 +2916,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) {
@@ -2924,7 +2929,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) {
@@ -2937,7 +2942,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) {
@@ -2951,7 +2956,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) {
@@ -2965,7 +2970,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) {
@@ -2979,7 +2984,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) {
@@ -3136,7 +3141,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
name, src_type_name, dst_type_name);
printf("%-70s", str);
H5_FAILED();
- puts(" Unknown data type.");
+ HDputs(" Unknown data type.");
goto error;
}
@@ -3148,7 +3153,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
dst_nbits = H5Tget_precision(dst); /* not 8*dst_size, esp on J90 - QAK */
buf = aligned_malloc(nelmts*MAX(src_size, dst_size));
saved = aligned_malloc(nelmts*MAX(src_size, dst_size));
- aligned = malloc(sizeof(long_long));
+ aligned = HDmalloc(sizeof(long_long));
#ifdef SHOW_OVERFLOWS
noverflows_g = 0;
#endif
@@ -3163,7 +3168,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
name, src_type_name, dst_type_name);
}
printf("%-70s", str);
- fflush(stdout);
+ HDfflush(stdout);
fails_this_test=0;
/*
@@ -3171,10 +3176,12 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
* will be used for the conversion while the `saved' buffer will be
* sed for the comparison later.
*/
- for (j=0; j<nelmts*src_size; j++) buf[j] = saved[j] = rand();
+ for (j=0; j<nelmts*src_size; j++)
+ buf[j] = saved[j] = HDrand();
/* Perform the conversion */
- if (H5Tconvert(src, dst, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(src, dst, nelmts, buf, NULL, H5P_DEFAULT)<0)
+ goto error;
/* Check the results from the library against hardware */
for (j=0; j<nelmts; j++) {
@@ -3194,8 +3201,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_char = (char)(*((short*)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved+j*sizeof(short),
- sizeof(unsigned short));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned short), sizeof(unsigned short));
hw_char = (char)(*((unsigned short*)aligned));
break;
case INT_INT:
@@ -3203,8 +3209,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_char = (char)(*((int*)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved+j*sizeof(unsigned),
- sizeof(unsigned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned), sizeof(unsigned));
hw_char = (char)(*((unsigned*)aligned));
break;
case INT_LONG:
@@ -3212,18 +3217,15 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_char = (char)(*((long*)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved+j*sizeof(long),
- sizeof(unsigned long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long), sizeof(unsigned long));
hw_char = (char)(*((unsigned long*)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(long_long));
+ HDmemcpy(aligned, saved+j*sizeof(long_long), sizeof(long_long));
hw_char = (char)(*((long_long*)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(unsigned long_long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long_long), sizeof(unsigned long_long));
hw_char = (char)(*((unsigned long_long*)aligned));
break;
case INT_OTHER:
@@ -3233,13 +3235,11 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char*)&hw_uchar;
switch (src_type) {
case INT_CHAR:
- HDmemcpy(aligned, saved+j*sizeof(char),
- sizeof(signed char));
+ HDmemcpy(aligned, saved+j*sizeof(signed char), sizeof(signed char));
hw_uchar = (unsigned char)(*((signed char*)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved+j*sizeof(char),
- sizeof(unsigned char));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned char), sizeof(unsigned char));
hw_uchar = (unsigned char)(*((unsigned char*)aligned));
break;
case INT_SHORT:
@@ -3247,8 +3247,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_uchar = (unsigned char)(*((short*)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved+j*sizeof(short),
- sizeof(unsigned short));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned short), sizeof(unsigned short));
hw_uchar = (unsigned char)(*((unsigned short*)aligned));
break;
case INT_INT:
@@ -3256,8 +3255,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_uchar = (unsigned char)(*((int*)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved+j*sizeof(unsigned),
- sizeof(unsigned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned), sizeof(unsigned));
hw_uchar = (unsigned char)(*((unsigned*)aligned));
break;
case INT_LONG:
@@ -3265,20 +3263,16 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_uchar = (unsigned char)(*((long*)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved+j*sizeof(long),
- sizeof(unsigned long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long), sizeof(unsigned long));
hw_uchar = (unsigned char)(*((unsigned long*)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(long_long));
+ HDmemcpy(aligned, saved+j*sizeof(long_long), sizeof(long_long));
hw_uchar = (unsigned char)(*((long_long*)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(unsigned long_long));
- hw_uchar = (unsigned char)(*((unsigned long_long*)
- aligned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long_long), sizeof(unsigned long_long));
+ hw_uchar = (unsigned char)(*((unsigned long_long*)aligned));
break;
case INT_OTHER:
break;
@@ -3287,12 +3281,11 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char*)&hw_short;
switch (src_type) {
case INT_CHAR:
- HDmemcpy(aligned, saved+j*sizeof(char), sizeof(signed char));
+ HDmemcpy(aligned, saved+j*sizeof(signed char), sizeof(signed char));
hw_short = (short)(*((signed char*)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved+j*sizeof(char),
- sizeof(unsigned char));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned char), sizeof(unsigned char));
hw_short = (short)(*((unsigned char*)aligned));
break;
case INT_SHORT:
@@ -3300,8 +3293,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_short = (short)(*((short*)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved+j*sizeof(short),
- sizeof(unsigned short));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned short), sizeof(unsigned short));
hw_short = (short)(*((unsigned short*)aligned));
break;
case INT_INT:
@@ -3309,8 +3301,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_short = (short)(*((int*)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved+j*sizeof(unsigned),
- sizeof(unsigned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned), sizeof(unsigned));
hw_short = (short)(*((unsigned*)aligned));
break;
case INT_LONG:
@@ -3318,18 +3309,15 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_short = (short)(*((long*)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved+j*sizeof(long),
- sizeof(unsigned long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long), sizeof(unsigned long));
hw_short = (short)(*((unsigned long*)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(long_long));
+ HDmemcpy(aligned, saved+j*sizeof(long_long), sizeof(long_long));
hw_short = (short)(*((long_long*)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(unsigned long_long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long_long), sizeof(unsigned long_long));
hw_short = (short)(*((unsigned long_long*)aligned));
break;
case INT_OTHER:
@@ -3339,12 +3327,11 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char*)&hw_ushort;
switch (src_type) {
case INT_CHAR:
- HDmemcpy(aligned, saved+j*sizeof(char), sizeof(signed char));
+ HDmemcpy(aligned, saved+j*sizeof(signed char), sizeof(signed char));
hw_ushort = (unsigned short)(*((signed char*)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved+j*sizeof(char),
- sizeof(unsigned char));
+ HDmemcpy(aligned, saved+j*sizeof(char), sizeof(unsigned char));
hw_ushort = (unsigned short)(*((unsigned char*)aligned));
break;
case INT_SHORT:
@@ -3352,8 +3339,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_ushort = (unsigned short)(*((short*)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved+j*sizeof(short),
- sizeof(unsigned short));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned short), sizeof(unsigned short));
hw_ushort = (unsigned short)(*((unsigned short*)aligned));
break;
case INT_INT:
@@ -3361,8 +3347,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_ushort = (unsigned short)(*((int*)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved+j*sizeof(unsigned),
- sizeof(unsigned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned), sizeof(unsigned));
hw_ushort = (unsigned short)(*((unsigned*)aligned));
break;
case INT_LONG:
@@ -3370,20 +3355,16 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_ushort = (unsigned short)(*((long*)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved+j*sizeof(long),
- sizeof(unsigned long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long), sizeof(unsigned long));
hw_ushort = (unsigned short)(*((unsigned long*)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(long_long));
+ HDmemcpy(aligned, saved+j*sizeof(long_long), sizeof(long_long));
hw_ushort = (unsigned short)(*((long_long*)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(unsigned long_long));
- hw_ushort = (unsigned short)(*((unsigned long_long*)
- aligned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long_long), sizeof(unsigned long_long));
+ hw_ushort = (unsigned short)(*((unsigned long_long*)aligned));
break;
case INT_OTHER:
break;
@@ -3392,12 +3373,11 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char*)&hw_int;
switch (src_type) {
case INT_CHAR:
- HDmemcpy(aligned, saved+j*sizeof(char), sizeof(signed char));
+ HDmemcpy(aligned, saved+j*sizeof(signed char), sizeof(signed char));
hw_int = (int)(*((signed char*)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved+j*sizeof(char),
- sizeof(unsigned char));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned char), sizeof(unsigned char));
hw_int = (int)(*((unsigned char*)aligned));
break;
case INT_SHORT:
@@ -3405,8 +3385,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_int = (int)(*((short*)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved+j*sizeof(short),
- sizeof(unsigned short));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned short), sizeof(unsigned short));
hw_int = (int)(*((unsigned short*)aligned));
break;
case INT_INT:
@@ -3414,8 +3393,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_int = (int)(*((int*)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved+j*sizeof(unsigned),
- sizeof(unsigned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned), sizeof(unsigned));
hw_int = (int)(*((unsigned*)aligned));
break;
case INT_LONG:
@@ -3423,18 +3401,15 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_int = (int)(*((long*)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved+j*sizeof(long),
- sizeof(unsigned long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long), sizeof(unsigned long));
hw_int = (int)(*((unsigned long*)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(long_long));
+ HDmemcpy(aligned, saved+j*sizeof(long_long), sizeof(long_long));
hw_int = (int)(*((long_long*)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(unsigned long_long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long_long), sizeof(unsigned long_long));
hw_int = (int)(*((unsigned long_long*)aligned));
break;
case INT_OTHER:
@@ -3444,13 +3419,11 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char*)&hw_uint;
switch (src_type) {
case INT_CHAR:
- HDmemcpy(aligned, saved+j*sizeof(char),
- sizeof(signed char));
+ HDmemcpy(aligned, saved+j*sizeof(signed char), sizeof(signed char));
hw_uint = (unsigned int)(*((signed char*)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved+j*sizeof(char),
- sizeof(unsigned char));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned char), sizeof(unsigned char));
hw_uint = (unsigned int)(*((unsigned char*)aligned));
break;
case INT_SHORT:
@@ -3458,8 +3431,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_uint = (unsigned int)(*((short*)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved+j*sizeof(short),
- sizeof(unsigned short));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned short), sizeof(unsigned short));
hw_uint = (unsigned int)(*((unsigned short*)aligned));
break;
case INT_INT:
@@ -3467,8 +3439,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_uint = (unsigned int)(*((int*)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved+j*sizeof(unsigned),
- sizeof(unsigned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned), sizeof(unsigned));
hw_uint = (unsigned int)(*((unsigned*)aligned));
break;
case INT_LONG:
@@ -3476,18 +3447,15 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_uint = (unsigned int)(*((long*)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved+j*sizeof(long),
- sizeof(unsigned long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long), sizeof(unsigned long));
hw_uint = (unsigned int)(*((unsigned long*)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(long_long));
+ HDmemcpy(aligned, saved+j*sizeof(long_long), sizeof(long_long));
hw_uint = (unsigned int)(*((long_long*)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(unsigned long_long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long_long), sizeof(unsigned long_long));
hw_uint = (unsigned int)(*((unsigned long_long*)aligned));
break;
case INT_OTHER:
@@ -3497,13 +3465,11 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char*)&hw_long;
switch (src_type) {
case INT_CHAR:
- HDmemcpy(aligned, saved+j*sizeof(char),
- sizeof(signed char));
+ HDmemcpy(aligned, saved+j*sizeof(signed char), sizeof(signed char));
hw_long = (long int)(*((signed char*)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved+j*sizeof(char),
- sizeof(unsigned char));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned char), sizeof(unsigned char));
hw_long = (long int)(*((unsigned char*)aligned));
break;
case INT_SHORT:
@@ -3511,8 +3477,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_long = (long int)(*((short*)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved+j*sizeof(short),
- sizeof(unsigned short));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned short), sizeof(unsigned short));
hw_long = (long int)(*((unsigned short*)aligned));
break;
case INT_INT:
@@ -3520,8 +3485,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_long = (long int)(*((int*)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved+j*sizeof(unsigned),
- sizeof(unsigned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned), sizeof(unsigned));
hw_long = (long int)(*((unsigned*)aligned));
break;
case INT_LONG:
@@ -3529,18 +3493,15 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_long = (long int)(*((long*)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved+j*sizeof(long),
- sizeof(unsigned long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long), sizeof(unsigned long));
hw_long = (long int)(*((unsigned long*)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(long_long));
+ HDmemcpy(aligned, saved+j*sizeof(long_long), sizeof(long_long));
hw_long = (long int)(*((long_long*)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(unsigned long_long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long_long), sizeof(unsigned long_long));
hw_long = (long int)(*((unsigned long_long*)aligned));
break;
case INT_OTHER:
@@ -3550,13 +3511,11 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char*)&hw_ulong;
switch (src_type) {
case INT_CHAR:
- HDmemcpy(aligned, saved+j*sizeof(char),
- sizeof(signed char));
+ HDmemcpy(aligned, saved+j*sizeof(signed char), sizeof(signed char));
hw_ulong = (unsigned long)(*((signed char*)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved+j*sizeof(char),
- sizeof(unsigned char));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned char), sizeof(unsigned char));
hw_ulong = (unsigned long)(*((unsigned char*)aligned));
break;
case INT_SHORT:
@@ -3564,8 +3523,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_ulong = (unsigned long)(*((short*)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved+j*sizeof(short),
- sizeof(unsigned short));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned short), sizeof(unsigned short));
hw_ulong = (unsigned long)(*((unsigned short*)aligned));
break;
case INT_INT:
@@ -3573,8 +3531,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_ulong = (unsigned long)(*((int*)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved+j*sizeof(unsigned),
- sizeof(unsigned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned), sizeof(unsigned));
hw_ulong = (unsigned long)(*((unsigned*)aligned));
break;
case INT_LONG:
@@ -3582,20 +3539,16 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_ulong = (unsigned long)(*((long*)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved+j*sizeof(long),
- sizeof(unsigned long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long), sizeof(unsigned long));
hw_ulong = (unsigned long)(*((unsigned long*)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(long_long));
+ HDmemcpy(aligned, saved+j*sizeof(long_long), sizeof(long_long));
hw_ulong = (unsigned long)(*((long_long*)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(unsigned long_long));
- hw_ulong = (unsigned long)(*((unsigned long_long*)
- aligned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long_long), sizeof(unsigned long_long));
+ hw_ulong = (unsigned long)(*((unsigned long_long*)aligned));
break;
case INT_OTHER:
break;
@@ -3604,13 +3557,11 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char*)&hw_llong;
switch (src_type) {
case INT_CHAR:
- HDmemcpy(aligned, saved+j*sizeof(char),
- sizeof(signed char));
+ HDmemcpy(aligned, saved+j*sizeof(signed char), sizeof(signed char));
hw_llong = (long_long)(*((signed char*)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved+j*sizeof(char),
- sizeof(unsigned char));
+ HDmemcpy(aligned, saved+j*sizeof(char), sizeof(unsigned char));
hw_llong = (long_long)(*((unsigned char*)aligned));
break;
case INT_SHORT:
@@ -3618,8 +3569,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_llong = (long_long)(*((short*)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved+j*sizeof(short),
- sizeof(unsigned short));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned short), sizeof(unsigned short));
hw_llong = (long_long)(*((unsigned short*)aligned));
break;
case INT_INT:
@@ -3627,8 +3577,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_llong = (long_long)(*((int*)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved+j*sizeof(unsigned),
- sizeof(unsigned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned), sizeof(unsigned));
hw_llong = (long_long)(*((unsigned*)aligned));
break;
case INT_LONG:
@@ -3636,18 +3585,15 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_llong = (long_long)(*((long*)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved+j*sizeof(long),
- sizeof(unsigned long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long), sizeof(unsigned long));
hw_llong = (long_long)(*((unsigned long*)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(long_long));
+ HDmemcpy(aligned, saved+j*sizeof(long_long), sizeof(long_long));
hw_llong = (long_long)(*((long_long*)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(unsigned long_long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long_long), sizeof(unsigned long_long));
hw_llong = (long_long)(*((unsigned long_long*)aligned));
break;
case INT_OTHER:
@@ -3657,34 +3603,27 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw = (unsigned char*)&hw_ullong;
switch (src_type) {
case INT_CHAR:
- HDmemcpy(aligned, saved+j*sizeof(char),
- sizeof(signed char));
- hw_ullong = (unsigned long_long)(*((signed char*)
- aligned));
+ HDmemcpy(aligned, saved+j*sizeof(signed char), sizeof(signed char));
+ hw_ullong = (unsigned long_long)(*((signed char*)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved+j*sizeof(char),
- sizeof(unsigned char));
- hw_ullong = (unsigned long_long)(*((unsigned char*)
- aligned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned char), sizeof(unsigned char));
+ hw_ullong = (unsigned long_long)(*((unsigned char*)aligned));
break;
case INT_SHORT:
HDmemcpy(aligned, saved+j*sizeof(short), sizeof(short));
hw_ullong = (unsigned long_long)(*((short*)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved+j*sizeof(short),
- sizeof(unsigned short));
- hw_ullong = (unsigned long_long)(*((unsigned short*)
- aligned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned short), sizeof(unsigned short));
+ hw_ullong = (unsigned long_long)(*((unsigned short*)aligned));
break;
case INT_INT:
HDmemcpy(aligned, saved+j*sizeof(int), sizeof(int));
hw_ullong = (unsigned long_long)(*((int*)aligned));
break;
case INT_UINT:
- HDmemcpy(aligned, saved+j*sizeof(unsigned),
- sizeof(unsigned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned), sizeof(unsigned));
hw_ullong = (unsigned long_long)(*((unsigned*)aligned));
break;
case INT_LONG:
@@ -3692,21 +3631,16 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
hw_ullong = (unsigned long_long)(*((long*)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved+j*sizeof(long),
- sizeof(unsigned long));
- hw_ullong = (unsigned long_long)(*((unsigned long*)
- aligned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long), sizeof(unsigned long));
+ hw_ullong = (unsigned long_long)(*((unsigned long*)aligned));
break;
case INT_LLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(long_long));
+ HDmemcpy(aligned, saved+j*sizeof(long_long), sizeof(long_long));
hw_ullong = (unsigned long_long)(*((long_long*)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(unsigned long_long));
- hw_ullong = (unsigned long_long)(*((unsigned long_long*)
- aligned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long_long), sizeof(unsigned long_long));
+ hw_ullong = (unsigned long_long)(*((unsigned long_long*)aligned));
break;
case INT_OTHER:
break;
@@ -3862,11 +3796,11 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
"");
switch (src_type) {
case INT_CHAR:
- HDmemcpy(aligned, saved+j*sizeof(char), sizeof(signed char));
+ HDmemcpy(aligned, saved+j*sizeof(signed char), sizeof(signed char));
printf(" %29d\n", *((signed char*)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, saved+j*sizeof(char), sizeof(unsigned char));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned char), sizeof(unsigned char));
printf(" %29u\n", *((unsigned char*)aligned));
break;
case INT_SHORT:
@@ -3874,8 +3808,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
printf(" %29hd\n", *((short*)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, saved+j*sizeof(short),
- sizeof(unsigned short));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned short), sizeof(unsigned short));
printf(" %29hu\n", *((unsigned short*)aligned));
break;
case INT_INT:
@@ -3891,7 +3824,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
printf(" %29ld\n", *((long*)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, saved+j*sizeof(long), sizeof(unsigned long));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long), sizeof(unsigned long));
printf(" %29lu\n", *((unsigned long*)aligned));
break;
case INT_LLONG:
@@ -3899,10 +3832,8 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
HDfprintf(stdout," %29"H5_PRINTF_LL_WIDTH"d\n", *((long_long*)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, saved+j*sizeof(long_long),
- sizeof(unsigned long_long));
- HDfprintf(stdout," %29"H5_PRINTF_LL_WIDTH"u\n",
- *((unsigned long_long*)aligned));
+ HDmemcpy(aligned, saved+j*sizeof(unsigned long_long), sizeof(unsigned long_long));
+ HDfprintf(stdout," %29"H5_PRINTF_LL_WIDTH"u\n", *((unsigned long_long*)aligned));
break;
case INT_OTHER:
break;
@@ -3916,11 +3847,11 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
"");
switch (dst_type) {
case INT_CHAR:
- HDmemcpy(aligned, buf+j*sizeof(char), sizeof(signed char));
+ HDmemcpy(aligned, buf+j*sizeof(signed char), sizeof(signed char));
printf(" %29d\n", *((signed char*)aligned));
break;
case INT_UCHAR:
- HDmemcpy(aligned, buf+j*sizeof(char), sizeof(unsigned char));
+ HDmemcpy(aligned, buf+j*sizeof(unsigned char), sizeof(unsigned char));
printf(" %29u\n", *((unsigned char*)aligned));
break;
case INT_SHORT:
@@ -3928,7 +3859,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
printf(" %29d\n", *((short*)aligned));
break;
case INT_USHORT:
- HDmemcpy(aligned, buf+j*sizeof(short), sizeof(unsigned short));
+ HDmemcpy(aligned, buf+j*sizeof(unsigned short), sizeof(unsigned short));
printf(" %29u\n", *((unsigned short*)aligned));
break;
case INT_INT:
@@ -3944,7 +3875,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
printf(" %29ld\n", *((long*)aligned));
break;
case INT_ULONG:
- HDmemcpy(aligned, buf+j*sizeof(long), sizeof(unsigned long));
+ HDmemcpy(aligned, buf+j*sizeof(unsigned long), sizeof(unsigned long));
printf(" %29lu\n", *((unsigned long*)aligned));
break;
case INT_LLONG:
@@ -3952,10 +3883,8 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
HDfprintf(stdout," %29"H5_PRINTF_LL_WIDTH"d\n", *((long_long*)aligned));
break;
case INT_ULLONG:
- HDmemcpy(aligned, buf+j*sizeof(long_long),
- sizeof(unsigned long_long));
- HDfprintf(stdout," %29"H5_PRINTF_LL_WIDTH"u\n",
- *((unsigned long_long*)aligned));
+ HDmemcpy(aligned, buf+j*sizeof(long_long), sizeof(unsigned long_long));
+ HDfprintf(stdout," %29"H5_PRINTF_LL_WIDTH"u\n", *((unsigned long_long*)aligned));
break;
case INT_OTHER:
break;
@@ -4003,7 +3932,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
}
if (++fails_all_tests>=max_fails) {
- puts(" maximum failures reached, aborting test...");
+ HDputs(" maximum failures reached, aborting test...");
goto done;
}
}
@@ -4019,16 +3948,16 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
done:
if (buf) aligned_free(buf);
if (saved) aligned_free(saved);
- if (aligned) free(aligned);
- fflush(stdout);
+ if (aligned) HDfree(aligned);
+ HDfflush(stdout);
reset_hdf5(); /*print statistics*/
return (int)fails_all_tests;
error:
if (buf) aligned_free(buf);
if (saved) aligned_free(saved);
- if (aligned) free(aligned);
- fflush(stdout);
+ if (aligned) HDfree(aligned);
+ HDfflush(stdout);
reset_hdf5(); /*print statistics*/
return MAX((int)fails_all_tests, 1);
}
@@ -4059,9 +3988,9 @@ test_conv_int_2(void)
char buf[32*100];
printf("%-70s", "Testing overlap calculations");
- fflush(stdout);
+ HDfflush(stdout);
- memset(buf, 0, sizeof buf);
+ HDmemset(buf, 0, sizeof buf);
for (i=1; i<=32; i++) {
for (j=1; j<=32; j++) {
@@ -4077,7 +4006,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);
}
@@ -4147,7 +4076,7 @@ my_isnan(flt_t type, void *val)
} else {
return 0;
}
- if (strstr(s, "NaN") || strstr(s, "NAN") || strstr(s, "nan"))
+ if (HDstrstr(s, "NaN") || HDstrstr(s, "NAN") || HDstrstr(s, "nan"))
retval = 1;
}
@@ -4221,10 +4150,10 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
* fork here and let the child run the test and return the number of
* failures with the exit status.
*/
- fflush(stdout);
- fflush(stderr);
+ HDfflush(stdout);
+ HDfflush(stderr);
if ((child_pid=fork())<0) {
- perror("fork");
+ HDperror("fork");
return 1;
} else if (child_pid>0) {
while (child_pid!=waitpid(child_pid, &status, 0)) /*void*/;
@@ -4233,7 +4162,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
} else if (WIFEXITED(status)) {
return WEXITSTATUS(status);
} else {
- puts(" Child didn't exit normally.");
+ HDputs(" Child didn't exit normally.");
return 1;
}
}
@@ -4282,13 +4211,13 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
/* Sanity checks */
if(sizeof(float)==sizeof(double))
- puts("Sizeof(float)==sizeof(double) - some tests may not be sensible.");
+ HDputs("Sizeof(float)==sizeof(double) - some tests may not be sensible.");
if (FLT_OTHER==src_type || FLT_OTHER==dst_type) {
sprintf(str, "Testing random %s %s -> %s conversions",
name, src_type_name, dst_type_name);
printf("%-70s", str);
H5_FAILED();
- puts(" Unknown data type.");
+ HDputs(" Unknown data type.");
goto error;
}
@@ -4322,7 +4251,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
name, src_type_name, dst_type_name);
}
printf("%-70s", str);
- fflush(stdout);
+ HDfflush(stdout);
fails_this_test = 0;
/*
@@ -4331,7 +4260,8 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
* used for the comparison later.
*/
if (!skip_overflow_tests_g) {
- for (j=0; j<nelmts*src_size; j++) buf[j] = saved[j] = rand();
+ for (j=0; j<nelmts*src_size; j++)
+ buf[j] = saved[j] = HDrand();
} else {
for (j=0; j<nelmts; j++) {
/* Do it this way for alignment reasons */
@@ -4341,11 +4271,10 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
double temp[1];
#endif
if (src_size<=dst_size) {
- for (k=0; k<dst_size; k++) buf[j*src_size+k] = rand();
+ for (k=0; k<dst_size; k++) buf[j*src_size+k] = HDrand();
} else {
- for (k=0; k<dst_size; k++) {
- ((unsigned char*)temp)[k] = rand();
- }
+ for (k=0; k<dst_size; k++)
+ ((unsigned char*)temp)[k] = HDrand();
if (FLT_DOUBLE==src_type && FLT_FLOAT==dst_type) {
hw_d = *((float*)temp);
HDmemcpy(buf+j*src_size, &hw_d, src_size);
@@ -4364,7 +4293,8 @@ 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) goto error;
+ if (H5Tconvert(src, dst, nelmts, buf, NULL, H5P_DEFAULT)<0)
+ goto error;
/* Check the software results against the hardware */
for (j=0; j<nelmts; j++) {
@@ -4408,8 +4338,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
}
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else {
- HDmemcpy(aligned, saved+j*sizeof(long double),
- sizeof(long double));
+ HDmemcpy(aligned, saved+j*sizeof(long double), sizeof(long double));
if (FLT_FLOAT==dst_type) {
hw_f = *((long double*)aligned);
hw = (unsigned char*)&hw_f;
@@ -4429,10 +4358,11 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
}
/* Are the two results the same? */
- for (k=0; k<dst_size; k++) {
- if (buf[j*dst_size+k]!=hw[k]) break;
- }
- if (k==dst_size) continue; /*no error*/
+ for (k=0; k<dst_size; k++)
+ if (buf[j*dst_size+k]!=hw[k])
+ break;
+ if (k==dst_size)
+ continue; /*no error*/
/*
* Assume same if both results are NaN. There are many NaN bit
@@ -4441,17 +4371,17 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
* pattern for NaN by setting the significand to all ones.
*/
if (FLT_FLOAT==dst_type &&
- my_isnan(dst_type, buf+j*sizeof(float)) &&
- my_isnan(dst_type, hw)) {
+ my_isnan(dst_type, buf+j*sizeof(float)) &&
+ my_isnan(dst_type, hw)) {
continue;
} else if (FLT_DOUBLE==dst_type &&
- my_isnan(dst_type, buf+j*sizeof(double)) &&
- my_isnan(dst_type, hw)) {
+ my_isnan(dst_type, buf+j*sizeof(double)) &&
+ my_isnan(dst_type, hw)) {
continue;
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
} else if (FLT_LDOUBLE==dst_type &&
- my_isnan(dst_type, buf+j*sizeof(long double)) &&
- my_isnan(dst_type, hw)) {
+ my_isnan(dst_type, buf+j*sizeof(long double)) &&
+ my_isnan(dst_type, hw)) {
continue;
#endif
}
@@ -4559,15 +4489,14 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
#endif /* H5_CONVERT_DENORMAL_FLOAT */
}
- if (0==fails_this_test++) H5_FAILED();
+ if (0==fails_this_test++)
+ H5_FAILED();
printf(" test %u, elmt %u\n", (unsigned)i+1, (unsigned)j);
printf(" src =");
- for (k=0; k<src_size; k++) {
+ for (k=0; k<src_size; k++)
printf(" %02x", saved[j*src_size+ENDIAN(src_size,k)]);
- }
- printf("%*s", (int)(3*MAX(0, (ssize_t)dst_size-(ssize_t)src_size)),
- "");
+ printf("%*s", (int)(3*MAX(0, (ssize_t)dst_size-(ssize_t)src_size)), "");
if (FLT_FLOAT==src_type) {
float x;
HDmemcpy(&x, &saved[j*dst_size], sizeof(float));
@@ -4585,11 +4514,9 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
}
printf(" dst =");
- for (k=0; k<dst_size; k++) {
+ for (k=0; k<dst_size; k++)
printf(" %02x", buf[j*dst_size+ENDIAN(dst_size,k)]);
- }
- printf("%*s", (int)(3*MAX(0, (ssize_t)src_size-(ssize_t)dst_size)),
- "");
+ printf("%*s", (int)(3*MAX(0, (ssize_t)src_size-(ssize_t)dst_size)), "");
if (FLT_FLOAT==dst_type) {
float x;
HDmemcpy(&x, &buf[j*dst_size], sizeof(float));
@@ -4607,33 +4534,29 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
}
printf(" ans =");
- for (k=0; k<dst_size; k++) {
+ for (k=0; k<dst_size; k++)
printf(" %02x", hw[ENDIAN(dst_size,k)]);
- }
- printf("%*s", (int)(3*MAX(0, (ssize_t)src_size-(ssize_t)dst_size)),
- "");
- if (FLT_FLOAT==dst_type) {
+ printf("%*s", (int)(3*MAX(0, (ssize_t)src_size-(ssize_t)dst_size)), "");
+ if (FLT_FLOAT==dst_type)
printf(" %29.20e\n", hw_f);
- } else if (FLT_DOUBLE==dst_type) {
+ else if (FLT_DOUBLE==dst_type)
printf(" %29.20e\n", hw_d);
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE
- } else {
+ else
HDfprintf(stdout," %29.20Le\n", hw_ld);
#endif
- }
if (++fails_all_tests>=max_fails) {
- puts(" maximum failures reached, aborting test...");
+ HDputs(" maximum failures reached, aborting test...");
goto done;
}
}
PASSED();
}
#ifdef SHOW_OVERFLOWS
- if (noverflows_g>0) {
+ if (noverflows_g>0)
printf(" %d overflow%s in previous test\n",
noverflows_g, 1==noverflows_g?"":"s");
- }
#endif
done:
@@ -4642,10 +4565,10 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
#endif
if (buf) aligned_free(buf);
if (saved) aligned_free(saved);
- if (aligned) free(aligned);
- fflush(stdout);
+ if (aligned) HDfree(aligned);
+ HDfflush(stdout);
#ifdef HANDLE_SIGFPE
- exit(MIN((int)fails_all_tests, 254));
+ HDexit(MIN((int)fails_all_tests, 254));
#else
reset_hdf5();
return (int)fails_all_tests;
@@ -4654,10 +4577,10 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
error:
if (buf) aligned_free(buf);
if (saved) aligned_free(saved);
- if (aligned) free(aligned);
- fflush(stdout);
+ if (aligned) HDfree(aligned);
+ HDfflush(stdout);
#ifdef HANDLE_SIGFPE
- exit(MIN(MAX((int)fails_all_tests, 1), 254));
+ HDexit(MIN(MAX((int)fails_all_tests, 1), 254));
#else
reset_hdf5();
return MAX((int)fails_all_tests, 1);
@@ -4856,11 +4779,9 @@ main(void)
reset_hdf5();
fapl = h5_fileaccess();
- if (ALIGNMENT) {
- printf("Testing non-aligned conversions (ALIGNMENT=%d)....\n",
- ALIGNMENT);
- }
-
+ if (ALIGNMENT)
+ printf("Testing non-aligned conversions (ALIGNMENT=%d)....\n", ALIGNMENT);
+
/* Do the tests */
nerrors += test_classes();
nerrors += test_copy();
@@ -4926,7 +4847,7 @@ main(void)
if (nerrors) {
printf("***** %lu FAILURE%s! *****\n",
nerrors, 1==nerrors?"":"S");
- exit(1);
+ HDexit(1);
}
printf("All data type tests passed.\n");
return 0;