summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-04-18 04:10:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-04-18 04:10:36 (GMT)
commitd09b08ce39f96d70f1d68a9f2e0313495c784619 (patch)
tree63ba039519b469adb1fffd30261079ae0dcf93f1
parent0343b61666f105ca865dcbc0cbcff87f43f5e489 (diff)
downloadhdf5-d09b08ce39f96d70f1d68a9f2e0313495c784619.zip
hdf5-d09b08ce39f96d70f1d68a9f2e0313495c784619.tar.gz
hdf5-d09b08ce39f96d70f1d68a9f2e0313495c784619.tar.bz2
[svn-r8384] Purpose:
Code cleanup Description: Clean up lots of warnings based on those reported from the SGI compilers as well as gcc. Platforms tested: SGI O3900, IRIX64 6.5 (Cheryl's SGI machine) FreeBSD 4.9 (sleipnir) w/ & w/o parallel h5committest
-rw-r--r--fortran/src/H5Pf.c8
-rw-r--r--src/H5D.c42
-rw-r--r--src/H5Dcontig.c8
-rw-r--r--src/H5Dio.c8
-rw-r--r--src/H5FDmpio.c2
-rw-r--r--src/H5Fcontig.c8
-rw-r--r--src/H5G.c8
-rw-r--r--src/H5R.c6
-rw-r--r--src/H5Smpio.c1
-rw-r--r--src/H5V.c10
-rw-r--r--src/H5Vprivate.h5
-rw-r--r--src/H5Zdeflate.c2
-rw-r--r--test/dsets.c24
-rw-r--r--test/dtypes.c6
-rw-r--r--test/h5test.h1
-rw-r--r--test/hyperslab.c10
-rw-r--r--test/istore.c8
-rw-r--r--test/testframe.c2
-rw-r--r--test/theap.c6
-rw-r--r--test/titerate.c6
-rw-r--r--test/ttst.c2
-rw-r--r--test/tvltypes.c4
-rw-r--r--test/unlink.c4
-rw-r--r--testpar/t_mpi.c12
-rw-r--r--testpar/testphdf5.h1
-rw-r--r--tools/h5diff/h5diff.c389
-rw-r--r--tools/h5diff/h5difftst.c1
-rw-r--r--tools/h5dump/h5dump.c67
-rwxr-xr-xtools/h5import/h5import.c14
-rw-r--r--tools/h5ls/h5ls.c2
-rw-r--r--tools/lib/h5tools_str.c9
31 files changed, 314 insertions, 362 deletions
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index a1dc96b..4fc934a 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -1683,10 +1683,9 @@ int_f
nh5pset_hyper_cache_c(hid_t_f *prp_id, int_f * cache, int_f * limit)
{
int ret_value = -1;
- hid_t c_prp_id;
#ifdef H5_WANT_H5_V1_4_COMPAT
+ hid_t c_prp_id;
herr_t ret;
-#endif /* H5_WANT_H5_V1_4_COMPAT */
unsigned c_cache, c_limit;
c_cache = (unsigned) *cache;
@@ -1696,7 +1695,6 @@ nh5pset_hyper_cache_c(hid_t_f *prp_id, int_f * cache, int_f * limit)
* Call H5Pset_hyper_cache function.
*/
c_prp_id = (hid_t)*prp_id;
-#ifdef H5_WANT_H5_V1_4_COMPAT
ret = H5Pset_hyper_cache(c_prp_id, c_cache, c_limit);
if (ret < 0) return ret_value;
#endif /* H5_WANT_H5_V1_4_COMPAT */
@@ -1860,7 +1858,7 @@ nh5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree)
{
int ret_value = -1;
hid_t c_fapl_id;
- hid_t c_degree;
+ H5F_close_degree_t c_degree;
c_fapl_id = (hid_t)*fapl_id;
c_degree = (H5F_close_degree_t)*degree;
@@ -1915,7 +1913,7 @@ nh5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size)
c_prp_id = (hid_t)*prp_id;
c_size = H5Pget_buffer(c_prp_id, NULL, NULL);
- if ( c_size < 0 ) return ret_value;
+ if ( c_size == 0 ) return ret_value;
*size = (hsize_t)c_size;
ret_value = 0;
return ret_value;
diff --git a/src/H5D.c b/src/H5D.c
index 066c048..f3affc4 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -599,7 +599,7 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5D_crt_fill_value_cmp(const void *value1, const void *value2, size_t size)
+H5D_crt_fill_value_cmp(const void *value1, const void *value2, size_t UNUSED size)
{
const H5O_fill_t *fill1=(const H5O_fill_t *)value1, /* Create local aliases for values */
*fill2=(const H5O_fill_t *)value2;
@@ -655,7 +655,7 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5D_crt_ext_file_list_cmp(const void *value1, const void *value2, size_t size)
+H5D_crt_ext_file_list_cmp(const void *value1, const void *value2, size_t UNUSED size)
{
const H5O_efl_t *efl1=(const H5O_efl_t *)value1, /* Create local aliases for values */
*efl2=(const H5O_efl_t *)value2;
@@ -737,7 +737,7 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5D_crt_data_pipeline_cmp(const void *value1, const void *value2, size_t size)
+H5D_crt_data_pipeline_cmp(const void *value1, const void *value2, size_t UNUSED size)
{
const H5O_pline_t *pline1=(const H5O_pline_t *)value1, /* Create local aliases for values */
*pline2=(const H5O_pline_t *)value2;
@@ -763,40 +763,40 @@ H5D_crt_data_pipeline_cmp(const void *value1, const void *value2, size_t size)
if(pline1->filter==NULL && pline2->filter!=NULL) HGOTO_DONE(-1);
if(pline1->filter!=NULL && pline2->filter==NULL) HGOTO_DONE(1);
if(pline1->filter!=NULL && pline1->nfilters>0) {
- int i; /* Local index variable */
+ size_t u; /* Local index variable */
/* Loop through all filters, comparing them */
- for(i=0; i<pline1->nfilters; i++) {
+ for(u=0; u<pline1->nfilters; u++) {
/* Check the ID of the filter */
- if(pline1->filter[i].id < pline2->filter[i].id) HGOTO_DONE(-1);
- if(pline1->filter[i].id > pline2->filter[i].id) HGOTO_DONE(1);
+ if(pline1->filter[u].id < pline2->filter[u].id) HGOTO_DONE(-1);
+ if(pline1->filter[u].id > pline2->filter[u].id) HGOTO_DONE(1);
/* Check the flags for the filter */
- if(pline1->filter[i].flags < pline2->filter[i].flags) HGOTO_DONE(-1);
- if(pline1->filter[i].flags > pline2->filter[i].flags) HGOTO_DONE(1);
+ if(pline1->filter[u].flags < pline2->filter[u].flags) HGOTO_DONE(-1);
+ if(pline1->filter[u].flags > pline2->filter[u].flags) HGOTO_DONE(1);
/* Check the name of the filter */
- if(pline1->filter[i].name==NULL && pline2->filter[i].name!=NULL) HGOTO_DONE(-1);
- if(pline1->filter[i].name!=NULL && pline2->filter[i].name==NULL) HGOTO_DONE(1);
- if(pline1->filter[i].name!=NULL)
- if((cmp_value=HDstrcmp(pline1->filter[i].name,pline2->filter[i].name))!=0)
+ if(pline1->filter[u].name==NULL && pline2->filter[u].name!=NULL) HGOTO_DONE(-1);
+ if(pline1->filter[u].name!=NULL && pline2->filter[u].name==NULL) HGOTO_DONE(1);
+ if(pline1->filter[u].name!=NULL)
+ if((cmp_value=HDstrcmp(pline1->filter[u].name,pline2->filter[u].name))!=0)
HGOTO_DONE(cmp_value);
/* Check the number of parameters for the filter */
- if(pline1->filter[i].cd_nelmts < pline2->filter[i].cd_nelmts) HGOTO_DONE(-1);
- if(pline1->filter[i].cd_nelmts > pline2->filter[i].cd_nelmts) HGOTO_DONE(1);
+ if(pline1->filter[u].cd_nelmts < pline2->filter[u].cd_nelmts) HGOTO_DONE(-1);
+ if(pline1->filter[u].cd_nelmts > pline2->filter[u].cd_nelmts) HGOTO_DONE(1);
/* Check the filter parameter information */
- if(pline1->filter[i].cd_values==NULL && pline2->filter[i].cd_values!=NULL) HGOTO_DONE(-1);
- if(pline1->filter[i].cd_values!=NULL && pline2->filter[i].cd_values==NULL) HGOTO_DONE(1);
- if(pline1->filter[i].cd_values!=NULL && pline1->filter[i].cd_nelmts>0) {
+ if(pline1->filter[u].cd_values==NULL && pline2->filter[u].cd_values!=NULL) HGOTO_DONE(-1);
+ if(pline1->filter[u].cd_values!=NULL && pline2->filter[u].cd_values==NULL) HGOTO_DONE(1);
+ if(pline1->filter[u].cd_values!=NULL && pline1->filter[u].cd_nelmts>0) {
size_t v; /* Local index variable */
/* Loop through all parameters, comparing them */
- for(v=0; v<pline1->filter[i].cd_nelmts; v++) {
+ for(v=0; v<pline1->filter[u].cd_nelmts; v++) {
/* Check each parameter for the filter */
- if(pline1->filter[i].cd_values[v] < pline2->filter[i].cd_values[v]) HGOTO_DONE(-1);
- if(pline1->filter[i].cd_values[v] > pline2->filter[i].cd_values[v]) HGOTO_DONE(1);
+ if(pline1->filter[u].cd_values[v] < pline2->filter[u].cd_values[v]) HGOTO_DONE(-1);
+ if(pline1->filter[u].cd_values[v] > pline2->filter[u].cd_values[v]) HGOTO_DONE(1);
} /* end for */
} /* end if */
} /* end for */
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 525d557..9b1ad40 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -138,7 +138,6 @@ H5F_contig_fill(H5F_t *f, hid_t dxpl_id, struct H5O_layout_t *layout,
#ifdef H5_HAVE_PARALLEL
MPI_Comm mpi_comm=MPI_COMM_NULL; /* MPI communicator for file */
int mpi_rank=(-1); /* This process's rank */
- int mpi_size=(-1); /* Total # of processes */
int mpi_code; /* MPI return code */
unsigned blocks_written=0; /* Flag to indicate that chunk was actually written */
unsigned using_mpi=0; /* Flag to indicate that the file is being accessed with an MPI-capable file driver */
@@ -167,8 +166,6 @@ H5F_contig_fill(H5F_t *f, hid_t dxpl_id, struct H5O_layout_t *layout,
/* Get the MPI rank & size */
if ((mpi_rank=H5FD_mpio_mpi_rank(f->shared->lf))<0)
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank");
- if ((mpi_size=H5FD_mpio_mpi_size(f->shared->lf))<0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI size");
/* Set the MPI-capable file driver flag */
using_mpi=1;
@@ -181,8 +178,6 @@ H5F_contig_fill(H5F_t *f, hid_t dxpl_id, struct H5O_layout_t *layout,
/* Get the MPI rank & size */
if ((mpi_rank=H5FD_mpiposix_mpi_rank(f->shared->lf))<0)
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank");
- if ((mpi_size=H5FD_mpiposix_mpi_size(f->shared->lf))<0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI size");
/* Set the MPI-capable file driver flag */
using_mpi=1;
@@ -197,9 +192,6 @@ H5F_contig_fill(H5F_t *f, hid_t dxpl_id, struct H5O_layout_t *layout,
if ((mpi_rank = H5FD_fphdf5_mpi_rank(f->shared->lf)) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank");
- if ((mpi_size = H5FD_fphdf5_mpi_size(f->shared->lf)) < 0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI size");
-
/* Set the MPI-capable file driver flag */
using_mpi = 1;
} /* end if */
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 364eaea..452663a 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -2690,7 +2690,7 @@ H5D_create_chunk_file_map_hyper(const fm_map *fm)
} /* end for */
/* Calculate the index of this chunk */
- if(H5V_chunk_index(fm->f_ndims,coords,fm->layout->dim,fm->chunks,fm->down_chunks,&chunk_index)<0)
+ if(H5V_chunk_index(fm->f_ndims,coords,fm->layout->dim,fm->down_chunks,&chunk_index)<0)
HGOTO_ERROR (H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index");
/* Iterate through each chunk in the dataset */
@@ -2802,7 +2802,7 @@ H5D_create_chunk_file_map_hyper(const fm_map *fm)
} while(coords[curr_dim]>sel_end[curr_dim]);
/* Re-Calculate the index of this chunk */
- if(H5V_chunk_index(fm->f_ndims,coords,fm->layout->dim,fm->chunks,fm->down_chunks,&chunk_index)<0)
+ if(H5V_chunk_index(fm->f_ndims,coords,fm->layout->dim,fm->down_chunks,&chunk_index)<0)
HGOTO_ERROR (H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index");
} /* end if */
} /* end while */
@@ -3024,7 +3024,7 @@ H5D_chunk_file_cb(void UNUSED *elem, hid_t UNUSED type_id, hsize_t ndims, hssize
FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_file_cb)
/* Calculate the index of this chunk */
- if(H5V_chunk_index((unsigned)ndims,coords,fm->layout->dim,fm->chunks,fm->down_chunks,&chunk_index)<0)
+ if(H5V_chunk_index((unsigned)ndims,coords,fm->layout->dim,fm->down_chunks,&chunk_index)<0)
HGOTO_ERROR (H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index")
/* Find correct chunk in file & memory TBBTs */
@@ -3135,7 +3135,7 @@ H5D_chunk_mem_cb(void UNUSED *elem, hid_t UNUSED type_id, hsize_t ndims, hssize_
FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_mem_cb);
/* Calculate the index of this chunk */
- if(H5V_chunk_index((unsigned)ndims,coords,fm->layout->dim,fm->chunks,fm->down_chunks,&chunk_index)<0)
+ if(H5V_chunk_index((unsigned)ndims,coords,fm->layout->dim,fm->down_chunks,&chunk_index)<0)
HGOTO_ERROR (H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index");
/* Find correct chunk in file & memory TBBTs */
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 8f8c769..7cf6677 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -1754,7 +1754,7 @@ H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
H5FD_mpio_xfer_t xfer_mode; /* I/O tranfer mode */
/* Obtain the data transfer properties */
- xfer_mode = H5P_peek_unsigned(plist, H5D_XFER_IO_XFER_MODE_NAME);
+ xfer_mode = (H5FD_mpio_xfer_t)H5P_peek_unsigned(plist, H5D_XFER_IO_XFER_MODE_NAME);
/*
* Set up for a fancy xfer using complex types, or single byte block. We
diff --git a/src/H5Fcontig.c b/src/H5Fcontig.c
index 525d557..9b1ad40 100644
--- a/src/H5Fcontig.c
+++ b/src/H5Fcontig.c
@@ -138,7 +138,6 @@ H5F_contig_fill(H5F_t *f, hid_t dxpl_id, struct H5O_layout_t *layout,
#ifdef H5_HAVE_PARALLEL
MPI_Comm mpi_comm=MPI_COMM_NULL; /* MPI communicator for file */
int mpi_rank=(-1); /* This process's rank */
- int mpi_size=(-1); /* Total # of processes */
int mpi_code; /* MPI return code */
unsigned blocks_written=0; /* Flag to indicate that chunk was actually written */
unsigned using_mpi=0; /* Flag to indicate that the file is being accessed with an MPI-capable file driver */
@@ -167,8 +166,6 @@ H5F_contig_fill(H5F_t *f, hid_t dxpl_id, struct H5O_layout_t *layout,
/* Get the MPI rank & size */
if ((mpi_rank=H5FD_mpio_mpi_rank(f->shared->lf))<0)
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank");
- if ((mpi_size=H5FD_mpio_mpi_size(f->shared->lf))<0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI size");
/* Set the MPI-capable file driver flag */
using_mpi=1;
@@ -181,8 +178,6 @@ H5F_contig_fill(H5F_t *f, hid_t dxpl_id, struct H5O_layout_t *layout,
/* Get the MPI rank & size */
if ((mpi_rank=H5FD_mpiposix_mpi_rank(f->shared->lf))<0)
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank");
- if ((mpi_size=H5FD_mpiposix_mpi_size(f->shared->lf))<0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI size");
/* Set the MPI-capable file driver flag */
using_mpi=1;
@@ -197,9 +192,6 @@ H5F_contig_fill(H5F_t *f, hid_t dxpl_id, struct H5O_layout_t *layout,
if ((mpi_rank = H5FD_fphdf5_mpi_rank(f->shared->lf)) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank");
- if ((mpi_size = H5FD_fphdf5_mpi_size(f->shared->lf)) < 0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI size");
-
/* Set the MPI-capable file driver flag */
using_mpi = 1;
} /* end if */
diff --git a/src/H5G.c b/src/H5G.c
index b120231..e615963 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -595,9 +595,9 @@ H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx)
/* Check args */
if (NULL==(loc=H5G_loc (loc_id)))
- HGOTO_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a location ID");
+ HGOTO_ERROR (H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "not a location ID");
if(H5G_get_type(loc,H5AC_ind_dxpl_id)!=H5G_GROUP)
- HGOTO_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a group");
+ HGOTO_ERROR (H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "not a group");
if (H5G_get_num_objs(loc, &num_objs, H5AC_ind_dxpl_id)<0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "unable to retrieve number of members");
@@ -605,7 +605,7 @@ H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "index out of bound");
/*call private function*/
- ret_value = H5G_get_objtype_by_idx(loc, idx, H5AC_ind_dxpl_id);
+ ret_value = (H5G_obj_t)H5G_get_objtype_by_idx(loc, idx, H5AC_ind_dxpl_id);
done:
FUNC_LEAVE_API(ret_value);
@@ -2566,7 +2566,7 @@ H5G_get_objinfo (H5G_entry_t *loc, const char *name, hbool_t follow_link,
statbuf->mtime = 0;
}
}
- statbuf->type = H5G_get_type(&obj_ent, dxpl_id);
+ statbuf->type = (H5G_obj_t)H5G_get_type(&obj_ent, dxpl_id);
H5E_clear(); /*clear errors resulting from checking type*/
/* Get object header information */
diff --git a/src/H5R.c b/src/H5R.c
index 8e18959..50e8745 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -880,7 +880,11 @@ H5Rget_obj_type(hid_t id, H5R_type_t ref_type, void *_ref)
file=loc->file;
/* Get the object information */
- if ((ret_value=H5R_get_obj_type(file,H5AC_ind_dxpl_id,ref_type,_ref))<0)
+ if ((ret_value=
+#ifndef H5_WANT_H5_V1_4_COMPAT
+ (H5G_obj_t)
+#endif /* H5_WANT_H5_V1_4_COMPAT */
+ H5R_get_obj_type(file,H5AC_ind_dxpl_id,ref_type,_ref))<0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, H5G_UNKNOWN, "unable to determine object type");
done:
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index e820b92..08632b9 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -567,7 +567,6 @@ H5S_mpio_space_type( const H5S_t *space, size_t elmt_size,
case H5S_COMPLEX:
/* not yet implemented */
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "complex data spaces are not supported yet");
- break;
default:
assert("unknown data space type" && 0);
diff --git a/src/H5V.c b/src/H5V.c
index 88793e2..dfadee9 100644
--- a/src/H5V.c
+++ b/src/H5V.c
@@ -1027,7 +1027,7 @@ done:
*-------------------------------------------------------------------------
*/
hsize_t
-H5V_array_offset_pre(unsigned n, const hsize_t *total_size, const hsize_t *acc, const hssize_t *offset)
+H5V_array_offset_pre(unsigned n, const hsize_t *acc, const hssize_t *offset)
{
hsize_t skip; /*starting point byte offset */
int i; /*counter */
@@ -1036,7 +1036,6 @@ H5V_array_offset_pre(unsigned n, const hsize_t *total_size, const hsize_t *acc,
FUNC_ENTER_NOAPI(H5V_array_offset_pre, (HDabort(), 0));
assert(n <= H5V_HYPER_NDIMS);
- assert(total_size);
assert(acc);
assert(offset);
@@ -1089,7 +1088,7 @@ H5V_array_offset(unsigned n, const hsize_t *total_size, const hssize_t *offset)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADVALUE, UFAIL, "can't compute down sizes");
/* Set return value */
- ret_value=H5V_array_offset_pre(n,total_size,acc_arr,offset);
+ ret_value=H5V_array_offset_pre(n,acc_arr,offset);
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -1194,7 +1193,7 @@ done:
*/
herr_t
H5V_chunk_index(unsigned ndims, const hssize_t *coord, const hsize_t *chunk,
- const hsize_t *nchunks, const hsize_t *down_nchunks, hsize_t *chunk_idx)
+ const hsize_t *down_nchunks, hsize_t *chunk_idx)
{
hssize_t scaled_coord[H5V_HYPER_NDIMS]; /* Scaled, coordinates, in terms of chunks */
unsigned u; /* Local index variable */
@@ -1206,7 +1205,6 @@ H5V_chunk_index(unsigned ndims, const hssize_t *coord, const hsize_t *chunk,
assert(ndims <= H5V_HYPER_NDIMS);
assert(coord);
assert(chunk);
- assert(nchunks);
assert(chunk_idx);
/* Compute the scaled coordinates for actual coordinates */
@@ -1214,7 +1212,7 @@ H5V_chunk_index(unsigned ndims, const hssize_t *coord, const hsize_t *chunk,
scaled_coord[u]=coord[u]/chunk[u];
/* Compute the chunk index */
- *chunk_idx=H5V_array_offset_pre(ndims,nchunks,down_nchunks,scaled_coord);
+ *chunk_idx=H5V_array_offset_pre(ndims,down_nchunks,scaled_coord);
done:
FUNC_LEAVE_NOAPI(ret_value);
diff --git a/src/H5Vprivate.h b/src/H5Vprivate.h
index 07692b0..f109e27 100644
--- a/src/H5Vprivate.h
+++ b/src/H5Vprivate.h
@@ -85,15 +85,14 @@ H5_DLL herr_t H5V_array_fill(void *_dst, const void *src, size_t size,
size_t count);
H5_DLL herr_t H5V_array_down(unsigned n, const hsize_t *total_size,
hsize_t *down);
-H5_DLL hsize_t H5V_array_offset_pre(unsigned n, const hsize_t *total_size,
+H5_DLL hsize_t H5V_array_offset_pre(unsigned n,
const hsize_t *acc, const hssize_t *offset);
H5_DLL hsize_t H5V_array_offset(unsigned n, const hsize_t *total_size,
const hssize_t *offset);
H5_DLL herr_t H5V_array_calc(hsize_t offset, unsigned n,
const hsize_t *total_size, hssize_t *coords);
H5_DLL herr_t H5V_chunk_index(unsigned ndims, const hssize_t *coord,
- const hsize_t *chunk, const hsize_t *nchunks, const hsize_t *down_nchunks,
- hsize_t *chunk_idx);
+ const hsize_t *chunk, const hsize_t *down_nchunks, hsize_t *chunk_idx);
H5_DLL ssize_t H5V_memcpyvv(void *_dst,
size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_len_arr[], hsize_t dst_off_arr[],
const void *_src,
diff --git a/src/H5Zdeflate.c b/src/H5Zdeflate.c
index 89f15cc..e83cd86 100644
--- a/src/H5Zdeflate.c
+++ b/src/H5Zdeflate.c
@@ -48,7 +48,7 @@ const H5Z_class_t H5Z_DEFLATE[1] = {{
H5Z_filter_deflate, /* The actual filter function */
}};
-#define H5Z_DEFLATE_SIZE_ADJUST(s) (HDceil((double)((s)*1.001))+12)
+#define H5Z_DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s))*1.001)+12)
/*-------------------------------------------------------------------------
diff --git a/test/dsets.c b/test/dsets.c
index 3862f84..176f64e 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -1425,7 +1425,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for (i=0; i<size[0]; i++) {
for (j=0; j<size[1]/2; j++) {
- points[i][j] = HDrandom ();
+ points[i][j] = (int)HDrandom ();
}
}
if (H5Dwrite (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, points)<0)
@@ -1531,7 +1531,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for (i=0; i<hs_size[0]; i++) {
for (j=0; j<hs_size[1]; j++) {
- points[hs_offset[0]+i][hs_offset[1]+j] = HDrandom();
+ points[hs_offset[0]+i][hs_offset[1]+j] = (int)HDrandom();
}
}
if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, NULL, hs_size,
@@ -2159,7 +2159,7 @@ test_onebyte_shuffle(hid_t file)
for (i= 0;i< 10; i++)
for (j = 0; j < 20; j++)
- orig_data[i][j] = HDrandom();
+ orig_data[i][j] = (unsigned char)HDrandom();
PASSED();
#else
@@ -3124,10 +3124,9 @@ static herr_t
auxread_fdata(hid_t fid, const char *name)
{
hid_t dset_id; /* dataset ID */
- hid_t dcpl_id; /* dataset creation property list ID */
- hid_t space_id; /* space ID */
- hid_t ftype_id; /* file data type ID */
- hid_t mtype_id; /* memory data type ID */
+ hid_t space_id=(-1); /* space ID */
+ hid_t ftype_id=(-1); /* file data type ID */
+ hid_t mtype_id=(-1); /* memory data type ID */
size_t msize; /* memory size of memory type */
void *buf=NULL; /* data buffer */
hsize_t nelmts; /* number of elements in dataset */
@@ -3141,8 +3140,6 @@ auxread_fdata(hid_t fid, const char *name)
goto error;
if ((ftype_id=H5Dget_type (dset_id))<0)
goto error;
- if ((dcpl_id=H5Dget_create_plist(dset_id))<0)
- goto error;
if ( (rank=H5Sget_simple_extent_ndims(space_id))<0)
goto error;
HDmemset(dims, 0, sizeof dims);
@@ -3167,8 +3164,6 @@ auxread_fdata(hid_t fid, const char *name)
goto error;
}
- if (H5Pclose(dcpl_id)<0)
- goto error;
if (H5Sclose(space_id)<0)
goto error;
if (H5Dclose(dset_id)<0)
@@ -3180,7 +3175,6 @@ auxread_fdata(hid_t fid, const char *name)
error:
H5E_BEGIN_TRY {
- H5Pclose(dcpl_id);
H5Sclose(space_id);
H5Dclose(dset_id);
H5Tclose(ftype_id);
@@ -3211,9 +3205,9 @@ static herr_t
test_filters_endianess(void)
{
hid_t fid; /* file ID */
- hid_t dsid; /* dataset ID */
+ hid_t dsid=(-1); /* dataset ID */
hid_t sid; /* dataspace ID */
- hid_t dcpl; /* dataset creation property list ID */
+ hid_t dcpl=(-1); /* dataset creation property list ID */
hsize_t dims[1]={2}; /* dataspace dimensions */
hsize_t chunk_dims[1]={2}; /* chunk dimensions */
int buf[2];
@@ -3352,7 +3346,7 @@ main(void)
#endif
/* Set the random # seed */
- HDsrandom((unsigned long)time(NULL));
+ HDsrandom((unsigned long)HDtime(NULL));
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) {
diff --git a/test/dtypes.c b/test/dtypes.c
index e6afea8..6048b9d 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -3955,7 +3955,6 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
int uflow=0; /*underflow debug counters*/
size_t i, j, k; /*counters */
int endian; /*machine endianess */
- size_t src_ebias; /* Source type's exponent bias */
size_t dst_ebias; /* Destination type's exponent bias */
size_t src_epos; /* Source type's exponent position */
size_t src_esize; /* Source type's exponent size */
@@ -4056,7 +4055,6 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
#endif
/* Get "interesting" values */
- src_ebias=H5Tget_ebias(src);
dst_ebias=H5Tget_ebias(dst);
H5Tget_fields(src,NULL,&src_epos,&src_esize,NULL,NULL);
H5Tget_fields(dst,NULL,&dst_epos,&dst_esize,NULL,&dst_msize);
@@ -4259,7 +4257,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
/* Special check for denormalized values */
if(check_expo[0]<(-(int)dst_ebias) || check_expo[1]<(-(int)dst_ebias)) {
int expo_diff=check_expo[0]-check_expo[1];
- int valid_bits=((dst_ebias+dst_msize)+MIN(check_expo[0],check_expo[1]))-1;
+ int valid_bits=((int)(dst_ebias+dst_msize)+MIN(check_expo[0],check_expo[1]))-1;
double epsilon=1.0;
/* Re-scale the mantissas based on any exponent difference */
@@ -4604,7 +4602,7 @@ main(void)
hid_t fapl=-1;
/* Set the random # seed */
- HDsrandom((unsigned long)time(NULL));
+ HDsrandom((unsigned long)HDtime(NULL));
reset_hdf5();
fapl = h5_fileaccess();
diff --git a/test/h5test.h b/test/h5test.h
index 99706f0..619332c 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -109,6 +109,7 @@ extern "C" {
#endif
/* Generally useful testing routines */
+H5TEST_DLL herr_t h5_errors(void *client_data);
H5TEST_DLL int h5_cleanup(const char *base_name[], hid_t fapl);
H5TEST_DLL char *h5_fixname(const char *base_name, hid_t fapl, char *fullname,
size_t size);
diff --git a/test/hyperslab.c b/test/hyperslab.c
index 556d2f0..720dc0f 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -1077,7 +1077,7 @@ test_array_fill(size_t lo, size_t hi)
/* Setup */
for(u=0; u<ARRAY_FILL_SIZE; u++)
- src[u]=u;
+ src[u]=(int)u;
/* Fill */
for(w=lo; w<=hi; w++) {
@@ -1147,9 +1147,9 @@ test_array_offset_n_calc(size_t n, size_t x, size_t y, size_t z)
/* Check offsets */
for(u=0; u<n; u++) {
/* Get random coordinate */
- coords[0] = HDrandom() % z;
- coords[1] = HDrandom() % y;
- coords[2] = HDrandom() % x;
+ coords[0] = (hssize_t)(HDrandom() % z);
+ coords[1] = (hssize_t)(HDrandom() % y);
+ coords[2] = (hssize_t)(HDrandom() % x);
/* Get offset of coordinate */
off=H5V_array_offset(ARRAY_OFFSET_NDIMS,dims,coords);
@@ -1227,7 +1227,7 @@ main(int argc, char *argv[])
printf("\n");
/* Set the random # seed */
- HDsrandom((unsigned long)time(NULL));
+ HDsrandom((unsigned long)HDtime(NULL));
/*
* Open the library explicitly for thread-safe builds, so per-thread
diff --git a/test/istore.c b/test/istore.c
index 7de1d90..0830ff4 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -492,9 +492,9 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks,
if((mspace=H5Screate_simple(ndims,size,NULL))<0) TEST_ERROR;
for (ctr=0; ctr<nblocks; ctr++) {
- offset[0] = HDrandom() % (TEST_SPARSE_SIZE-nx);
- offset[1] = HDrandom() % (TEST_SPARSE_SIZE-ny);
- offset[2] = HDrandom() % (TEST_SPARSE_SIZE-nz);
+ offset[0] = (hssize_t)(HDrandom() % (TEST_SPARSE_SIZE-nx));
+ offset[1] = (hssize_t)(HDrandom() % (TEST_SPARSE_SIZE-ny));
+ offset[2] = (hssize_t)(HDrandom() % (TEST_SPARSE_SIZE-nz));
/* Select region in file dataspace */
if(H5Sselect_hyperslab(fspace,H5S_SELECT_SET,offset,NULL,size,NULL)<0) TEST_ERROR;
@@ -599,7 +599,7 @@ main(int argc, char *argv[])
printf("\n");
/* Set the random # seed */
- HDsrandom((unsigned long)time(NULL));
+ HDsrandom((unsigned long)HDtime(NULL));
/* Reset library */
h5_reset();
diff --git a/test/testframe.c b/test/testframe.c
index 4539276..27a81fc 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -168,7 +168,7 @@ void TestInfo(const char *ProgName)
void TestParseCmdLine(int argc, char *argv[], int *Summary, int *CleanUp)
{
int CLLoop; /* Command Line Loop */
- int Loop, Loop1;
+ int Loop;
for (CLLoop = 1; CLLoop < argc; CLLoop++) {
if ((argc > CLLoop + 1) && ((HDstrcmp(argv[CLLoop], "-verbose") == 0) ||
diff --git a/test/theap.c b/test/theap.c
index 3c134bb..87c4836 100644
--- a/test/theap.c
+++ b/test/theap.c
@@ -87,15 +87,13 @@ static int tst_inc_sort(const void *_i1, const void *_i2)
static void
test_heap_init(void)
{
- time_t curr_time; /* Current time, for seeding random number generator */
size_t u; /* Local index variables */
/* Create randomized set of numbers */
- curr_time=time(NULL);
- HDsrandom((unsigned long)curr_time);
+ HDsrandom((unsigned long)HDtime(NULL));
for(u=0; u<NUM_ELEMS; u++)
/* Generate random numbers from -1000 to 1000 */
- rand_num[u].val=(HDrandom()%2001)-1001;
+ rand_num[u].val=(int)(HDrandom()%2001)-1001;
/* Sort random numbers into increasing order */
HDmemcpy(inc_sort_num,rand_num,sizeof(test_obj)*NUM_ELEMS);
diff --git a/test/titerate.c b/test/titerate.c
index 5d93063..cfeb03e 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -197,7 +197,7 @@ static void test_iter_group(void)
VERIFY(num_membs,NDATASETS+2,"H5Gget_num_objs");
for(i=0; i< (int)num_membs; i++) {
- ret = H5Gget_objname_by_idx(root_group, (hsize_t)i, dataset_name, NAMELEN);
+ ret = (herr_t)H5Gget_objname_by_idx(root_group, (hsize_t)i, dataset_name, NAMELEN);
CHECK(ret, FAIL, "H5Gget_objname_by_idx");
ret = (herr_t)H5Gget_objtype_by_idx(root_group, (hsize_t)i);
@@ -229,7 +229,7 @@ static void test_iter_group(void)
H5G_obj_t obj_type; /* Type of object in file */
#endif /*H5_WANT_H5_V1_4_COMPAT*/
- ret = H5Gget_objname_by_idx(file, (hsize_t)i, dataset_name, NAMELEN);
+ ret = (herr_t)H5Gget_objname_by_idx(file, (hsize_t)i, dataset_name, NAMELEN);
CHECK(ret, FAIL, "H5Gget_objname_by_idx");
obj_type = H5Gget_objtype_by_idx(file, (hsize_t)i);
@@ -796,7 +796,7 @@ static void test_grp_memb_funcs(void)
name_len = H5Gget_objname_by_idx(root_group, (hsize_t)i, NULL, NAMELEN);
CHECK(name_len, FAIL, "H5Gget_objname_by_idx");
- ret = H5Gget_objname_by_idx(root_group, (hsize_t)i, dataset_name, NAMELEN);
+ ret = (herr_t)H5Gget_objname_by_idx(root_group, (hsize_t)i, dataset_name, NAMELEN);
CHECK(ret, FAIL, "H5Gget_objname_by_idx");
/* Double-check that the length is the same */
diff --git a/test/ttst.c b/test/ttst.c
index ca45d9b..517c9b6 100644
--- a/test/ttst.c
+++ b/test/ttst.c
@@ -122,7 +122,7 @@ test_tst_init(void)
/* Create randomized set of unique words */
for(u=0; u<num_uniq_words; u++)
rand_uniq_words[u]=uniq_words[u];
- curr_time=time(NULL);
+ curr_time=HDtime(NULL);
HDsrandom((unsigned long)curr_time);
for(u=0; u<num_uniq_words; u++) {
v=u+(HDrandom()%(num_uniq_words-u));
diff --git a/test/tvltypes.c b/test/tvltypes.c
index 7a0aee2..3662927 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -942,12 +942,8 @@ test_vltypes_compound_vlen_vlen(void)
hid_t dataset; /* Dataset ID */
hid_t sid1; /* Dataspace ID */
hid_t tid1, tid2, tid3; /* Datatype IDs */
- hid_t xfer_pid; /* Dataset transfer property list ID */
- hid_t dcpl_pid; /* Dataset creation property list ID */
hsize_t dims1[] = {SPACE3_DIM1};
- hsize_t size; /* Number of bytes which will be used */
unsigned i,j,k; /* counting variables */
- size_t mem_used=0; /* Memory used during allocation */
hvl_t *t1, *t2; /* Temporary pointer to VL information */
herr_t ret; /* Generic return value */
diff --git a/test/unlink.c b/test/unlink.c
index ee76e83..cf9b5c8 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -752,7 +752,7 @@ test_filespace(void)
/* Set buffer to different random numbers each time */
for (v=0, tmp_data=data; v<(FILESPACE_DIM0*FILESPACE_DIM1*FILESPACE_DIM2); v++)
- *tmp_data++ = HDrandom();
+ *tmp_data++ = (int)HDrandom();
/* Write the buffer to the dataset */
if (H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data)<0) TEST_ERROR;
@@ -1835,7 +1835,7 @@ main(void)
double rdcc_w0;
/* Set the random # seed */
- HDsrandom((unsigned long)time(NULL));
+ HDsrandom((unsigned long)HDtime(NULL));
/* Open */
h5_reset();
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index d2d4ca2..c93eed6 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -93,11 +93,11 @@ test_mpio_overlap_writes(char *filename)
while (mpi_off < MPIO_TEST_WRITE_SIZE){
/* make sure the write does not exceed the TEST_WRITE_SIZE */
if (mpi_off+stride > MPIO_TEST_WRITE_SIZE)
- stride = MPIO_TEST_WRITE_SIZE - mpi_off;
+ stride = MPIO_TEST_WRITE_SIZE - (int)mpi_off;
/* set data to some trivial pattern for easy verification */
for (i=0; i<stride; i++)
- buf[i] = (mpi_off+i) & 0x7f;
+ buf[i] = (char)(mpi_off+i) & 0x7f;
mrc = MPI_File_write_at(fh, mpi_off, buf, stride, MPI_BYTE,
&mpi_stat);
VRFY((mrc==MPI_SUCCESS), "");
@@ -137,14 +137,14 @@ test_mpio_overlap_writes(char *filename)
for (mpi_off=0; mpi_off < MPIO_TEST_WRITE_SIZE; mpi_off += bufsize){
/* make sure it does not read beyond end of data */
if (mpi_off+stride > MPIO_TEST_WRITE_SIZE)
- stride = MPIO_TEST_WRITE_SIZE - mpi_off;
+ stride = MPIO_TEST_WRITE_SIZE - (int)mpi_off;
mrc = MPI_File_read_at(fh, mpi_off, buf, stride, MPI_BYTE,
&mpi_stat);
VRFY((mrc==MPI_SUCCESS), "");
vrfyerrs=0;
for (i=0; i<stride; i++){
char expected;
- expected = (mpi_off+i) & 0x7f;
+ expected = (char)(mpi_off+i) & 0x7f;
if ((buf[i] != expected) &&
(vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED))
printf("proc %d: found data error at [%ld], expect %d, got %d\n",
@@ -393,7 +393,7 @@ finish:
#define USEFSYNC 2 /* request file_sync */
-test_mpio_1wMr(char *filename, int special_request)
+int test_mpio_1wMr(char *filename, int special_request)
{
char hostname[128];
int mpi_size, mpi_rank;
@@ -489,7 +489,7 @@ if (special_request & USEATOM){
/* Only one process writes */
if (mpi_rank==irank){
if (VERBOSE_HI){
- PRINTID; printf("wrote %d bytes at %d\n", DIMSIZE, mpi_off);
+ PRINTID; printf("wrote %d bytes at %d\n", DIMSIZE, (int)mpi_off);
}
if ((mpi_err = MPI_File_write_at(fh, mpi_off, writedata, DIMSIZE,
MPI_BYTE, &mpi_stat))
diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h
index 5d6ec67..4bd448e 100644
--- a/testpar/testphdf5.h
+++ b/testpar/testphdf5.h
@@ -18,6 +18,7 @@
#define PHDF5TEST_H
#include "h5test.h"
+#include "testhdf5.h"
#ifndef TRUE
#define TRUE 1
diff --git a/tools/h5diff/h5diff.c b/tools/h5diff/h5diff.c
index 71c66ff..eb8debe 100644
--- a/tools/h5diff/h5diff.c
+++ b/tools/h5diff/h5diff.c
@@ -16,7 +16,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#include <assert.h>
#include "hdf5.h"
#include "h5trav.h"
#include "H5private.h"
@@ -63,18 +62,18 @@ options_t options = {0,0,0,0,0,0,0};
*/
static int diff_dataset( hid_t file1_id, hid_t file2_id, const char *obj1_name,
- const char *obj2_name, options_t options );
+ const char *obj2_name, options_t opts );
static int diff( hid_t file1_id, const char *obj1_name, hid_t file2_id, const char *obj2_name,
- options_t options, int type );
+ options_t opts, int type );
static int compare( hid_t file1_id, const char *file1_name, const char *obj1_name,
int nobjects1, info_t *info1,
hid_t file2_id, const char *file2_name, const char *obj2_name,
int nobjects2, info_t *info2,
- options_t options );
+ options_t opts );
static int match( hid_t file1_id, int nobjects1, info_t *info1,
- hid_t file2_id, int nobjects2, info_t *info2, options_t options );
+ hid_t file2_id, int nobjects2, info_t *info2, options_t opts );
static int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims,
- options_t options, const char *obj1, const char *obj2,
+ options_t opts, const char *obj1, const char *obj2,
hid_t m_type );
/*-------------------------------------------------------------------------
@@ -576,7 +575,7 @@ int compare_object( char *obj1, char *obj2 )
*/
static
int match( hid_t file1_id, int nobjects1, info_t *info1,
- hid_t file2_id, int nobjects2, info_t *info2, options_t options )
+ hid_t file2_id, int nobjects2, info_t *info2, options_t opts )
{
int cmp;
int more_names_exist = (nobjects1>0 && nobjects2>0) ? 1 : 0;
@@ -673,7 +672,7 @@ int match( hid_t file1_id, int nobjects1, info_t *info1,
if ( table->objs[i].objno[0]==1 && table->objs[i].objno[1]==1 )
nfound+=diff( file1_id, table->objs[i].objname,
file2_id, table->objs[i].objname,
- options, table->objs[i].type );
+ opts, table->objs[i].type );
}
/* free table */
@@ -745,7 +744,7 @@ int compare( hid_t file1_id, const char *file1_name, const char *obj1_name,
int nobjects1, info_t *info1,
hid_t file2_id, const char *file2_name, const char *obj2_name,
int nobjects2, info_t *info2,
- options_t options )
+ options_t opts )
{
int f1=0, f2=0;
@@ -781,7 +780,7 @@ int compare( hid_t file1_id, const char *file1_name, const char *obj1_name,
return 0;
}
- nfound=diff( file1_id, obj1_name, file2_id, obj2_name, options, info1[i].type );
+ nfound=diff( file1_id, obj1_name, file2_id, obj2_name, opts, info1[i].type );
return nfound;
}
@@ -807,14 +806,14 @@ int compare( hid_t file1_id, const char *file1_name, const char *obj1_name,
static
int diff( hid_t file1_id, const char *obj1_name, hid_t file2_id, const char *obj2_name,
- options_t options, int type )
+ options_t opts, int type )
{
int nfound=0;
switch ( type )
{
case H5G_DATASET:
- nfound=diff_dataset(file1_id,file2_id,obj1_name,obj2_name,options);
+ nfound=diff_dataset(file1_id,file2_id,obj1_name,obj2_name,opts);
break;
default:
@@ -849,7 +848,7 @@ int diff( hid_t file1_id, const char *obj1_name, hid_t file2_id, const char *obj
*/
static
int diff_dataset( hid_t file1_id, hid_t file2_id, const char *obj1_name,
- const char *obj2_name, options_t options )
+ const char *obj2_name, options_t opts )
{
void *edata;
hid_t (*func)(void*);
@@ -1189,7 +1188,7 @@ int diff_dataset( hid_t file1_id, hid_t file2_id, const char *obj1_name,
printf( "Comparing <%s> with <%s>\n", obj1_name, obj2_name );
name1=h5diff_basename(obj1_name);
name2=h5diff_basename(obj2_name);
- nfound = array_diff(buf1,buf2,tot_cnt1,rank1,dims1,options,name1,name2,m_type1);
+ nfound = array_diff(buf1,buf2,tot_cnt1,rank1,dims1,opts,name1,name2,m_type1);
printf("%d differences found\n", nfound );
/*-------------------------------------------------------------------------
@@ -1238,7 +1237,7 @@ out:
*/
static
int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims,
- options_t options, const char *obj1, const char *obj2,
+ options_t opts, const char *obj1, const char *obj2,
hid_t m_type )
{
char fmt_llong[255], fmt_ullong[255];
@@ -1288,13 +1287,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_char, _buf1, sizeof(char));
memcpy(&temp2_char, _buf2, sizeof(char));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (abs(temp1_char-temp2_char) > options.delta)
+ if (abs(temp1_char-temp2_char) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1304,13 +1303,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_char!=0 && abs(1-temp2_char/temp1_char) > options.percent )
+ if ( temp1_char!=0 && abs(1-temp2_char/temp1_char) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1321,14 +1320,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_char!=0 && abs(1-temp2_char/temp1_char) > options.percent &&
- abs(temp1_char-temp2_char) > options.delta )
+ if ( temp1_char!=0 && abs(1-temp2_char/temp1_char) > opts.percent &&
+ abs(temp1_char-temp2_char) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1340,9 +1339,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_char != temp2_char)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1372,13 +1371,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_uchar, _buf1, sizeof(unsigned char));
memcpy(&temp2_uchar, _buf2, sizeof(unsigned char));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (abs(temp1_uchar-temp2_uchar) > options.delta)
+ if (abs(temp1_uchar-temp2_uchar) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1388,13 +1387,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_uchar!=0 && abs(1-temp2_uchar/temp1_uchar) > options.percent )
+ if ( temp1_uchar!=0 && abs(1-temp2_uchar/temp1_uchar) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1405,14 +1404,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_uchar!=0 && abs(1-temp2_uchar/temp1_uchar) > options.percent &&
- abs(temp1_uchar-temp2_uchar) > options.delta )
+ if ( temp1_uchar!=0 && abs(1-temp2_uchar/temp1_uchar) > opts.percent &&
+ abs(temp1_uchar-temp2_uchar) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1424,9 +1423,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_uchar != temp2_uchar)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1457,13 +1456,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_short, _buf1, sizeof(short));
memcpy(&temp2_short, _buf2, sizeof(short));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (abs(temp1_short-temp2_short) > options.delta)
+ if (abs(temp1_short-temp2_short) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1473,13 +1472,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_short!=0 && abs(1-temp2_short/temp1_short) > options.percent )
+ if ( temp1_short!=0 && abs(1-temp2_short/temp1_short) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1490,14 +1489,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_short!=0 && abs(1-temp2_short/temp1_short) > options.percent &&
- abs(temp1_short-temp2_short) > options.delta )
+ if ( temp1_short!=0 && abs(1-temp2_short/temp1_short) > opts.percent &&
+ abs(temp1_short-temp2_short) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1509,9 +1508,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_short != temp2_short)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1541,13 +1540,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_ushort, _buf1, sizeof(unsigned short));
memcpy(&temp2_ushort, _buf2, sizeof(unsigned short));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (abs(temp1_ushort-temp2_ushort) > options.delta)
+ if (abs(temp1_ushort-temp2_ushort) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1557,13 +1556,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_ushort!=0 && abs(1-temp2_ushort/temp1_ushort) > options.percent )
+ if ( temp1_ushort!=0 && abs(1-temp2_ushort/temp1_ushort) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1574,14 +1573,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_ushort!=0 && abs(1-temp2_ushort/temp1_ushort) > options.percent &&
- abs(temp1_ushort-temp2_ushort) > options.delta )
+ if ( temp1_ushort!=0 && abs(1-temp2_ushort/temp1_ushort) > opts.percent &&
+ abs(temp1_ushort-temp2_ushort) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1593,9 +1592,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_ushort != temp2_ushort)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1626,13 +1625,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_int, _buf1, sizeof(int));
memcpy(&temp2_int, _buf2, sizeof(int));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (abs(temp1_int-temp2_int) > options.delta)
+ if (abs(temp1_int-temp2_int) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1642,13 +1641,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_int!=0 && abs(1-temp2_int/temp1_int) > options.percent )
+ if ( temp1_int!=0 && abs(1-temp2_int/temp1_int) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1659,14 +1658,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_int!=0 && abs(1-temp2_int/temp1_int) > options.percent &&
- abs(temp1_int-temp2_int) > options.delta )
+ if ( temp1_int!=0 && abs(1-temp2_int/temp1_int) > opts.percent &&
+ abs(temp1_int-temp2_int) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1678,9 +1677,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_int != temp2_int)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1711,13 +1710,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_uint, _buf1, sizeof(unsigned int));
memcpy(&temp2_uint, _buf2, sizeof(unsigned int));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (abs((int)(temp1_uint-temp2_uint)) > options.delta)
+ if (abs((int)(temp1_uint-temp2_uint)) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1727,13 +1726,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_uint!=0 && abs((int)(1-temp2_uint/temp1_uint)) > options.percent )
+ if ( temp1_uint!=0 && abs((int)(1-temp2_uint/temp1_uint)) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1744,14 +1743,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_uint!=0 && abs((int)(1-temp2_uint/temp1_uint)) > options.percent &&
- abs((int)(temp1_uint-temp2_uint)) > options.delta )
+ if ( temp1_uint!=0 && abs((int)(1-temp2_uint/temp1_uint)) > opts.percent &&
+ abs((int)(temp1_uint-temp2_uint)) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1763,9 +1762,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_uint != temp2_uint)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1796,13 +1795,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_long, _buf1, sizeof(long));
memcpy(&temp2_long, _buf2, sizeof(long));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (labs(temp1_long-temp2_long) > (long)options.delta)
+ if (labs(temp1_long-temp2_long) > (long)opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1812,13 +1811,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_long!=0 && labs(1-temp2_long/temp1_long) > (long)options.percent )
+ if ( temp1_long!=0 && labs(1-temp2_long/temp1_long) > (long)opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1829,14 +1828,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_long!=0 && labs(1-temp2_long/temp1_long) > (long)options.percent &&
- labs(temp1_long-temp2_long) > (long)options.delta )
+ if ( temp1_long!=0 && labs(1-temp2_long/temp1_long) > (long)opts.percent &&
+ labs(temp1_long-temp2_long) > (long)opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1848,9 +1847,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_long != temp2_long)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1880,13 +1879,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_ulong, _buf1, sizeof(unsigned long));
memcpy(&temp2_ulong, _buf2, sizeof(unsigned long));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (labs((long)(temp1_ulong-temp2_ulong)) > (long)options.delta)
+ if (labs((long)(temp1_ulong-temp2_ulong)) > (long)opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1896,13 +1895,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_ulong!=0 && labs((long)(1-temp2_ulong/temp1_ulong)) > (long)options.percent )
+ if ( temp1_ulong!=0 && labs((long)(1-temp2_ulong/temp1_ulong)) > (long)opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1913,14 +1912,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_ulong!=0 && labs((long)(1-temp2_ulong/temp1_ulong)) > (long)options.percent &&
- labs((long)(temp1_ulong-temp2_ulong)) > (long)options.delta )
+ if ( temp1_ulong!=0 && labs((long)(1-temp2_ulong/temp1_ulong)) > (long)opts.percent &&
+ labs((long)(temp1_ulong-temp2_ulong)) > (long)opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1932,9 +1931,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_ulong != temp2_ulong)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1964,13 +1963,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_llong, _buf1, sizeof(long_long));
memcpy(&temp2_llong, _buf2, sizeof(long_long));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (labs((long)(temp1_llong-temp2_llong)) > (long)options.delta)
+ if (labs((long)(temp1_llong-temp2_llong)) > (long)opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1980,13 +1979,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_llong!=0 && labs((long)(1-temp2_llong/temp1_llong)) > (long)options.percent )
+ if ( temp1_llong!=0 && labs((long)(1-temp2_llong/temp1_llong)) > (long)opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -1997,14 +1996,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_llong!=0 && labs((long)(1-temp2_llong/temp1_llong)) > (long)options.percent &&
- labs((long)(temp1_llong-temp2_llong)) > (long)options.delta )
+ if ( temp1_llong!=0 && labs((long)(1-temp2_llong/temp1_llong)) > (long)opts.percent &&
+ labs((long)(temp1_llong-temp2_llong)) > (long)opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2016,9 +2015,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_llong != temp2_llong)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2048,13 +2047,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_ullong, _buf1, sizeof(unsigned long_long));
memcpy(&temp2_ullong, _buf2, sizeof(unsigned long_long));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (labs((long)(temp1_ullong-temp2_ullong)) > (long)options.delta)
+ if (labs((long)(temp1_ullong-temp2_ullong)) > (long)opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2065,13 +2064,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_ullong!=0 && labs((long)(1-temp2_ullong/temp1_ullong)) > (long)options.percent )
+ if ( temp1_ullong!=0 && labs((long)(1-temp2_ullong/temp1_ullong)) > (long)opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2083,14 +2082,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_ullong!=0 && labs((long)(1-temp2_ullong/temp1_ullong)) > (long)options.percent &&
- labs((long)(temp1_ullong-temp2_ullong)) > (long)options.delta )
+ if ( temp1_ullong!=0 && labs((long)(1-temp2_ullong/temp1_ullong)) > (long)opts.percent &&
+ labs((long)(temp1_ullong-temp2_ullong)) > (long)opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2103,9 +2102,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_ullong != temp2_ullong)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2136,13 +2135,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_float, _buf1, sizeof(float));
memcpy(&temp2_float, _buf2, sizeof(float));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (fabs(temp1_float-temp2_float) > options.delta)
+ if (fabs(temp1_float-temp2_float) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2152,13 +2151,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_float!=0 && fabs(1-temp2_float/temp1_float) > options.percent )
+ if ( temp1_float!=0 && fabs(1-temp2_float/temp1_float) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2169,14 +2168,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_float!=0 && fabs(1-temp2_float/temp1_float) > options.percent &&
- fabs(temp1_float-temp2_float) > options.delta )
+ if ( temp1_float!=0 && fabs(1-temp2_float/temp1_float) > opts.percent &&
+ fabs(temp1_float-temp2_float) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2188,9 +2187,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_float != temp2_float)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2220,13 +2219,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
memcpy(&temp1_double, _buf1, sizeof(double));
memcpy(&temp2_double, _buf2, sizeof(double));
/* -d and !-p */
- if (options.d && !options.p)
+ if (opts.d && !opts.p)
{
- if (fabs(temp1_double-temp2_double) > options.delta)
+ if (fabs(temp1_double-temp2_double) > opts.delta)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2236,13 +2235,13 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* !-d and -p */
- else if (!options.d && options.p)
+ else if (!opts.d && opts.p)
{
- if ( temp1_double!=0 && fabs(1-temp2_double/temp1_double) > options.percent )
+ if ( temp1_double!=0 && fabs(1-temp2_double/temp1_double) > opts.percent )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2253,14 +2252,14 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
}
/* -d and -p */
- else if ( options.d && options.p)
+ else if ( opts.d && opts.p)
{
- if ( temp1_double!=0 && fabs(1-temp2_double/temp1_double) > options.percent &&
- fabs(temp1_double-temp2_double) > options.delta )
+ if ( temp1_double!=0 && fabs(1-temp2_double/temp1_double) > opts.percent &&
+ fabs(temp1_double-temp2_double) > opts.delta )
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,1,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
@@ -2272,9 +2271,9 @@ int array_diff( void *buf1, void *buf2, hsize_t tot_cnt, int rank, hsize_t *dims
}
else if (temp1_double != temp2_double)
{
- if (options.n && nfound>=options.count)
+ if (opts.n && nfound>=opts.count)
return nfound;
- if ( options.r==0 )
+ if ( opts.r==0 )
{
print_pos(&ph,0,i,acc,pos,rank,obj1,obj2);
printf(SPACES);
diff --git a/tools/h5diff/h5difftst.c b/tools/h5diff/h5difftst.c
index 783eb42..e270171 100644
--- a/tools/h5diff/h5difftst.c
+++ b/tools/h5diff/h5difftst.c
@@ -14,7 +14,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <assert.h>
#include "hdf5.h"
#include "H5private.h"
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 21913cd..601b3bd 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -70,7 +70,9 @@ static void dump_oid(hid_t oid);
static void print_enum(hid_t type);
static herr_t dump_all(hid_t group, const char *name, void *op_data);
static char *lookup_ref_path(hobj_ref_t *);
+#ifdef LATER
static void check_compression(hid_t);
+#endif /* LATER */
static struct ref_path_table_entry_t *ref_path_table_lookup(const char *);
static int xml_name_to_XID(const char *, char *, int , int );
static int get_next_xid(void);
@@ -1425,7 +1427,6 @@ dump_all(hid_t group, const char *name, void * op_data)
dump_header_format->datasetblockend);
} else {
/* the XML version */
- int res;
char *t_tmp;
char *t_prefix;
char *t_name;
@@ -1437,8 +1438,8 @@ dump_all(hid_t group, const char *name, void * op_data)
t_tmp = xml_escape_the_name(strcat(strcat(tx_tmp, "/"), name));
t_prefix = xml_escape_the_name(prefix);
t_name = xml_escape_the_name(name);
- res = xml_name_to_XID( strcat(strcat(tmp,"/"),name), dsetxid,100,1);
- res = xml_name_to_XID( prefix ,parentxid,100,1);
+ xml_name_to_XID( strcat(strcat(tmp,"/"),name), dsetxid,100,1);
+ xml_name_to_XID( prefix ,parentxid,100,1);
printf("<%sDataset Name=\"%s\" OBJ-XID=\"%s-%d\" "
"H5Path=\"%s\" Parents=\"%s\" "
@@ -1449,7 +1450,7 @@ dump_all(hid_t group, const char *name, void * op_data)
(strcmp(prefix, "") ? t_prefix : "/"));
indentation(indent + COL);
- res = xml_name_to_XID(dset_table->objs[i].objname,pointerxid,100,1);
+ xml_name_to_XID(dset_table->objs[i].objname,pointerxid,100,1);
printf("<%sDatasetPtr OBJ-XID=\"%s\" H5Path=\"%s\"/>\n",
xmlnsprefix,
pointerxid,t_tmp);
@@ -3743,9 +3744,8 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* This should be defined somewhere else */
/* These 2 cases are handled the same right now, but
probably will have something different eventually */
- int res;
char * dtxid = malloc(100);
- res = xml_name_to_XID(type_table->objs[i].objname,dtxid,100,1);
+ xml_name_to_XID(type_table->objs[i].objname,dtxid,100,1);
if (!type_table->objs[i].recorded) {
/* 'anonymous' NDT. Use it's object num.
as it's name. */
@@ -4111,9 +4111,8 @@ xml_dump_datatype(hid_t type)
if (i >= 0) {
/* Shared data type, must be entered as an object */
/* These 2 cases are the same now, but may change */
- int res;
char * dtxid = malloc(100);
- res = xml_name_to_XID(type_table->objs[i].objname,dtxid,100,1);
+ xml_name_to_XID(type_table->objs[i].objname,dtxid,100,1);
if (!type_table->objs[i].recorded) {
/* anonymous stored data type:
following the dumper's current
@@ -4457,7 +4456,6 @@ xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data)
static void
xml_dump_named_datatype(hid_t type, const char *name)
{
- int res;
char *tmp;
char * dtxid;
char * parentxid;
@@ -4476,8 +4474,8 @@ xml_dump_named_datatype(hid_t type, const char *name)
/*char **/t_tmp = xml_escape_the_name(tmp);
/*char **/t_prefix = xml_escape_the_name(prefix);
/*char **/t_name = xml_escape_the_name(name);
- res = xml_name_to_XID(tmp,dtxid,100,1);
- res = xml_name_to_XID(prefix,parentxid,100,1);
+ xml_name_to_XID(tmp,dtxid,100,1);
+ xml_name_to_XID(prefix,parentxid,100,1);
if (strncmp(name, "#", 1) == 0) {
/* Special: this is an 'anonymous' NDT, deleted but
still in use.
@@ -4583,20 +4581,19 @@ xml_dump_group(hid_t gid, const char *name)
d_status = EXIT_FAILURE;
} else if (group_table->objs[i].displayed) {
/* already seen: enter a groupptr */
- int res;
char *t_name = xml_escape_the_name(name);
char *grpxid = malloc(100);
char *parentxid = malloc(100);
if (isRoot) {
/* probably can't happen! */
- res = xml_name_to_XID("/",grpxid,100,1);
+ xml_name_to_XID("/",grpxid,100,1);
printf("<%sRootGroup OBJ-XID=\"%s\" H5Path=\"%s\">\n",
xmlnsprefix,grpxid,"/");
} else {
t_objname = xml_escape_the_name(group_table->objs[i].objname);
par_name = xml_escape_the_name(par);
- res = xml_name_to_XID(tmp,grpxid,100,1);
- res = xml_name_to_XID(par,parentxid,100,1);
+ xml_name_to_XID(tmp,grpxid,100,1);
+ xml_name_to_XID(par,parentxid,100,1);
printf("<%sGroup Name=\"%s\" OBJ-XID=\"%s-%d\" H5Path=\"%s\" "
"Parents=\"%s\" H5ParentPaths=\"%s\">\n",
xmlnsprefix,t_name, grpxid, get_next_xid(),
@@ -4611,8 +4608,8 @@ xml_dump_group(hid_t gid, const char *name)
ptrstr = malloc(100);
t_objname = xml_escape_the_name(group_table->objs[i].objname);
par_name = xml_escape_the_name(par);
- res = xml_name_to_XID(par,parentxid,100,1);
- res = xml_name_to_XID(group_table->objs[i].objname,ptrstr,100,1);
+ xml_name_to_XID(par,parentxid,100,1);
+ xml_name_to_XID(group_table->objs[i].objname,ptrstr,100,1);
printf("<%sGroupPtr OBJ-XID=\"%s\" H5Path=\"%s\" "
"Parents=\"%s\" H5ParentPaths=\"%s\" />\n",
xmlnsprefix,
@@ -4623,19 +4620,18 @@ xml_dump_group(hid_t gid, const char *name)
} else {
/* first time this group has been seen -- describe it */
- int res;
char *t_name = xml_escape_the_name(name);
char *grpxid = malloc(100);
char *parentxid = malloc(100);
if (isRoot) {
- res = xml_name_to_XID("/",grpxid,100,1);
+ xml_name_to_XID("/",grpxid,100,1);
printf("<%sRootGroup OBJ-XID=\"%s\" H5Path=\"%s\">\n",
xmlnsprefix,grpxid,"/");
} else {
char *t_tmp = xml_escape_the_name(tmp);
par_name = xml_escape_the_name(par);
- res = xml_name_to_XID(tmp,grpxid,100,1);
- res = xml_name_to_XID(par,parentxid,100,1);
+ xml_name_to_XID(tmp,grpxid,100,1);
+ xml_name_to_XID(par,parentxid,100,1);
printf("<%sGroup Name=\"%s\" OBJ-XID=\"%s\" H5Path=\"%s\" "
"Parents=\"%s\" H5ParentPaths=\"%s\" >\n",
xmlnsprefix,t_name, grpxid, t_tmp, parentxid, par_name);
@@ -4682,19 +4678,18 @@ xml_dump_group(hid_t gid, const char *name)
} else {
/* only link -- must be first time! */
- int res;
char *t_name = xml_escape_the_name(name);
char *grpxid = malloc(100);
char *parentxid = malloc(100);
if (isRoot) {
- res = xml_name_to_XID("/",grpxid,100,1);
+ xml_name_to_XID("/",grpxid,100,1);
printf("<%sRootGroup OBJ-XID=\"%s\" H5Path=\"%s\">\n",
xmlnsprefix,grpxid,"/");
} else {
char *t_tmp = xml_escape_the_name(tmp);
par_name = xml_escape_the_name(par);
- res = xml_name_to_XID(tmp,grpxid,100,1);
- res = xml_name_to_XID(par,parentxid,100,1);
+ xml_name_to_XID(tmp,grpxid,100,1);
+ xml_name_to_XID(par,parentxid,100,1);
printf("<%sGroup Name=\"%s\" OBJ-XID=\"%s\" H5Path=\"%s\" "
"Parents=\"%s\" H5ParentPaths=\"%s\" >\n",
xmlnsprefix,t_name, grpxid, t_tmp,
@@ -4864,7 +4859,7 @@ xml_print_strs(hid_t did, int source)
char *bp;
char *onestring=NULL;
hsize_t ssiz;
- size_t tsiz, str_size;
+ size_t tsiz, str_size=0;
size_t i;
htri_t is_vlstr;
@@ -4967,6 +4962,7 @@ xml_print_strs(hid_t did, int source)
*
*-------------------------------------------------------------------------
*/
+#ifdef LATER
static void
check_compression(hid_t dcpl)
{
@@ -4997,6 +4993,8 @@ check_compression(hid_t dcpl)
}
}
}
+#endif /* LATER */
+
/*-------------------------------------------------------------------------
* Function: check_filters
*
@@ -5095,8 +5093,8 @@ check_filters(hid_t dcpl)
static void xml_dump_fill_value(hid_t dcpl, hid_t type)
{
-int sz;
-int i;
+size_t sz;
+size_t i;
hsize_t space;
void * buf;
char * path;
@@ -5160,6 +5158,7 @@ char * name;
printf("\"");
for (i = 0; i < sz; i++) {
printf("%x ",*(unsigned int *)buf);
+ buf = (char *)buf + sizeof(unsigned int);
}
printf("\"\n");
indentation(indent);
@@ -5230,7 +5229,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset)
{
hid_t type, space;
hid_t dcpl;
- herr_t err;
H5D_fill_value_t fvstatus;
int maxdims;
hsize_t *chsize;
@@ -5238,7 +5236,6 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset)
int i;
H5D_alloc_time_t at;
H5D_fill_time_t ft;
- int res;
hsize_t tempi;
char *tmp;
char *t_name, *t_tmp, *t_prefix;
@@ -5255,8 +5252,8 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset)
t_tmp = xml_escape_the_name(tmp);
t_prefix = xml_escape_the_name(prefix);
- res = xml_name_to_XID(tmp, rstr, 100, 1);
- res = xml_name_to_XID(prefix, pstr, 100, 1);
+ xml_name_to_XID(tmp, rstr, 100, 1);
+ xml_name_to_XID(prefix, pstr, 100, 1);
printf("<%sDataset Name=\"%s\" OBJ-XID=\"%s\" H5Path= \"%s\" Parents=\"%s\" H5ParentPaths=\"%s\">\n",xmlnsprefix,
t_name, rstr, t_tmp, pstr, strcmp(prefix, "") ? t_prefix : "/");
@@ -5341,7 +5338,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset)
indent += COL;
indentation(indent);
printf("<%sFillValueInfo ",xmlnsprefix);
- err = H5Pget_fill_time(dcpl, &ft);
+ H5Pget_fill_time(dcpl, &ft);
printf("FillTime=\"");
switch ( ft ) {
case H5D_FILL_TIME_ALLOC:
@@ -5358,7 +5355,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset)
break;
}
printf("\" ");
- err = H5Pget_alloc_time(dcpl, &at);
+ H5Pget_alloc_time(dcpl, &at);
printf("AllocationTime=\"");
switch ( at ) {
case H5D_ALLOC_TIME_EARLY:
@@ -5382,7 +5379,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset)
indentation(indent);
printf("<%sFillValue>\n",xmlnsprefix);
indent += COL;
- err = H5Pfill_value_defined(dcpl, &fvstatus);
+ H5Pfill_value_defined(dcpl, &fvstatus);
if (fvstatus == H5D_FILL_VALUE_UNDEFINED) {
indentation(indent + COL);
printf("<%sNoFill/>\n",xmlnsprefix);
diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c
index 20dc785..28020d5 100755
--- a/tools/h5import/h5import.c
+++ b/tools/h5import/h5import.c
@@ -158,7 +158,7 @@ int main(int argc, char *argv[])
break;
case 14: /* read data size */
- if (getInputSize(in, HDstrtol(argv[i], NULL, BASE_10)) == -1)
+ if (getInputSize(in, (int)HDstrtol(argv[i], NULL, BASE_10)) == -1)
{
(void) fprintf(stderr, err8, argv[i]);
goto err;
@@ -384,7 +384,6 @@ readIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -418,7 +417,6 @@ readIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -451,7 +449,6 @@ readIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -486,7 +483,6 @@ readIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
#endif /* ifndef WIN32 */
@@ -551,7 +547,6 @@ readUIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -584,7 +579,6 @@ readUIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -617,7 +611,6 @@ readUIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -652,7 +645,6 @@ readUIntegerData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
#endif /* ifndef WIN32 */
@@ -716,7 +708,6 @@ readFloatData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -754,7 +745,6 @@ readFloatData(FILE **strm, struct Input *in)
default:
(void) fprintf(stderr, err2);
return (-1);
- break;
}
break;
@@ -1796,12 +1786,10 @@ getCompressionParameter(struct Input *in, FILE** strm)
}
in->compressionParam = ival;
return (0);
- break;
default:
(void) fprintf(stderr, err3);
return (-1);
- break;
}
}
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index aeb4594..58fb782 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -1755,7 +1755,7 @@ list (hid_t group, const char *name, void *_iter)
return 0;
} else if (sb.type<0 || sb.type>=H5G_NTYPES) {
printf("Unknown type(%d)", sb.type);
- sb.type = -1;
+ sb.type = H5G_UNKNOWN;
}
if (sb.type>=0 && dispatch_g[sb.type].name) {
fputs(dispatch_g[sb.type].name, stdout);
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 1053b60..970a46b 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -43,7 +43,7 @@
/* Variable length string datatype */
#define STR_INIT_LEN 4096 /*initial length */
-static char *h5tools_escape(char *s, size_t size, int escape_spaces);
+static char *h5tools_escape(char *s, size_t size);
static hbool_t h5tools_is_zero(const void *_mem, size_t size);
/*-------------------------------------------------------------------------
@@ -751,7 +751,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5dump_t *info, hid_t container,
char enum_name[1024];
if (H5Tenum_nameof(type, vp, enum_name, sizeof enum_name) >= 0) {
- h5tools_str_append(str, h5tools_escape(enum_name, sizeof(enum_name), TRUE));
+ h5tools_str_append(str, h5tools_escape(enum_name, sizeof(enum_name)));
} else {
size_t i;
n = H5Tget_size(type);
@@ -940,8 +940,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5dump_t *info, hid_t container,
* Function: h5tools_escape
*
* Purpose: Changes all "funny" characters in S into standard C escape
- * sequences. If ESCAPE_SPACES is non-zero then spaces are
- * escaped by prepending a backslash.
+ * sequences.
*
* Return: Success: S
*
@@ -957,7 +956,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5dump_t *info, hid_t container,
*-------------------------------------------------------------------------
*/
static char *
-h5tools_escape(char *s/*in,out*/, size_t size, int escape_spaces)
+h5tools_escape(char *s/*in,out*/, size_t size)
{
register size_t i;
size_t n = strlen(s);