summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perform/chunk.c4
-rw-r--r--perform/overhead.c4
-rw-r--r--src/H5D.c3
-rw-r--r--src/H5Distore.c2
-rw-r--r--src/H5FDfamily.c2
-rw-r--r--src/H5FDlog.c2
-rw-r--r--src/H5FDsec2.c2
-rw-r--r--src/H5Fistore.c2
-rw-r--r--src/H5Gnode.c6
-rw-r--r--src/H5Oshared.c2
-rw-r--r--src/H5Ostab.c2
-rw-r--r--src/H5Sall.c2
-rw-r--r--src/H5Shyper.c2
-rw-r--r--src/H5Snone.c4
-rw-r--r--src/H5T.c4
-rw-r--r--test/big.c6
-rw-r--r--test/dsets.c4
-rw-r--r--test/h5test.c2
-rw-r--r--tools/h5dump/h5dump.c18
-rw-r--r--tools/h5ls/h5ls.c6
20 files changed, 43 insertions, 36 deletions
diff --git a/perform/chunk.c b/perform/chunk.c
index db2db14..71d3903 100644
--- a/perform/chunk.c
+++ b/perform/chunk.c
@@ -83,8 +83,8 @@ static hid_t fapl_g = -1;
*/
static size_t
counter (unsigned UNUSED flags, size_t UNUSED cd_nelmts,
- const unsigned * UNUSED cd_values, size_t nbytes,
- size_t * UNUSED buf_size, void ** UNUSED buf)
+ const unsigned UNUSED *cd_values, size_t nbytes,
+ size_t UNUSED *buf_size, void UNUSED **buf)
{
nio_g += nbytes;
return nbytes;
diff --git a/perform/overhead.c b/perform/overhead.c
index 264a3ce..641bc50 100644
--- a/perform/overhead.c
+++ b/perform/overhead.c
@@ -43,8 +43,12 @@
#endif
#define FILE_NAME_1 "overhead.h5"
+#ifndef FALSE
#define FALSE 0
+#endif /* FALSE */
+#ifndef TRUE
#define TRUE 1
+#endif /* TRUE */
typedef enum fill_t {
FILL_ALL,
diff --git a/src/H5D.c b/src/H5D.c
index 3a0d024..e1ded37 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -2308,7 +2308,7 @@ printf("%s: check 1.0, nelmts=%d, H5S_get_select_npoints(file_space)=%d\n",FUNC,
if(H5P_get(dc_plist, H5D_CRT_DATA_PIPELINE_NAME, &pline) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve data pipeline");
if(H5P_fill_value_defined(dc_plist, &fill_status)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't tell if fill value defined");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined");
if((fill_status==H5D_FILL_VALUE_DEFAULT || fill_status==H5D_FILL_VALUE_USER_DEFINED) && H5P_get(dc_plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL,"can't retrieve fill value");
if(H5P_get(dc_plist, H5D_CRT_FILL_TIME_NAME, &fill_time) < 0)
@@ -3387,6 +3387,7 @@ H5D_init_storage(H5D_t *dset, const H5S_t *space)
if ((buf=H5FL_BLK_ALLOC(fill_conv,bufsize,0))==NULL)
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fill buffer");
+ /* Fill the buffer with the fill value */
H5V_array_fill(buf, fill.buf, fill.size, ptsperbuf);
/* Start at the beginning of the dataset */
diff --git a/src/H5Distore.c b/src/H5Distore.c
index da816af..d2cb490 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -665,7 +665,7 @@ H5F_istore_new_node(H5F_t *f, H5B_ins_t op,
*/
static herr_t
H5F_istore_found(H5F_t UNUSED *f, haddr_t addr, const void *_lt_key,
- void *_udata, const void * UNUSED _rt_key)
+ void *_udata, const void UNUSED *_rt_key)
{
H5F_istore_ud1_t *udata = (H5F_istore_ud1_t *) _udata;
const H5F_istore_key_t *lt_key = (const H5F_istore_key_t *) _lt_key;
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index 3f40b22..7c1bfab 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -670,7 +670,7 @@ H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_query(const H5FD_t * UNUSED _f, unsigned long *flags /* out */)
+H5FD_family_query(const H5FD_t UNUSED * _f, unsigned long *flags /* out */)
{
herr_t ret_value=SUCCEED;
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 63f2dec..0e4a094 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -755,7 +755,7 @@ H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_query(const H5FD_t * UNUSED _f, unsigned long *flags /* out */)
+H5FD_log_query(const H5FD_t UNUSED * _f, unsigned long *flags /* out */)
{
herr_t ret_value=SUCCEED;
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 026f27a..986906d 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -431,7 +431,7 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_query(const H5FD_t * UNUSED _f, unsigned long *flags /* out */)
+H5FD_sec2_query(const H5FD_t UNUSED * _f, unsigned long *flags /* out */)
{
herr_t ret_value=SUCCEED;
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index da816af..d2cb490 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -665,7 +665,7 @@ H5F_istore_new_node(H5F_t *f, H5B_ins_t op,
*/
static herr_t
H5F_istore_found(H5F_t UNUSED *f, haddr_t addr, const void *_lt_key,
- void *_udata, const void * UNUSED _rt_key)
+ void *_udata, const void UNUSED *_rt_key)
{
H5F_istore_ud1_t *udata = (H5F_istore_ud1_t *) _udata;
const H5F_istore_key_t *lt_key = (const H5F_istore_key_t *) _lt_key;
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 2662165..d4b3df2 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -130,7 +130,7 @@ H5FL_BLK_DEFINE_STATIC(symbol_node);
*-------------------------------------------------------------------------
*/
static size_t
-H5G_node_sizeof_rkey(H5F_t *f, const void * UNUSED udata)
+H5G_node_sizeof_rkey(H5F_t *f, const void UNUSED * udata)
{
return H5F_SIZEOF_SIZE(f); /*the name offset */
}
@@ -627,8 +627,8 @@ H5G_node_cmp3(H5F_t *f, void *_lt_key, void *_udata, void *_rt_key)
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_node_found(H5F_t *f, haddr_t addr, const void * UNUSED _lt_key,
- void *_udata, const void * UNUSED _rt_key)
+H5G_node_found(H5F_t *f, haddr_t addr, const void UNUSED *_lt_key,
+ void *_udata, const void UNUSED *_rt_key)
{
H5G_bt_ud1_t *bt_udata = (H5G_bt_ud1_t *) _udata;
H5G_node_t *sn = NULL;
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index 01dd480..1b8b423 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -178,7 +178,7 @@ H5O_shared_encode (H5F_t *f, uint8_t *buf/*out*/, const void *_mesg)
*-------------------------------------------------------------------------
*/
static size_t
-H5O_shared_size (H5F_t *f, const void * UNUSED _mesg)
+H5O_shared_size (H5F_t *f, const void UNUSED *_mesg)
{
size_t size;
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 0a9d46b..cec6c6f 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -233,7 +233,7 @@ H5O_stab_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
-H5O_stab_size(H5F_t *f, const void * UNUSED _mesg)
+H5O_stab_size(H5F_t *f, const void UNUSED *_mesg)
{
FUNC_ENTER(H5O_stab_size, 0);
FUNC_LEAVE(2 * H5F_SIZEOF_ADDR(f));
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 1afba52..a511cb8 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -817,7 +817,7 @@ H5S_all_select_serialize (const H5S_t *space, uint8_t *buf)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_all_select_deserialize (H5S_t *space, const uint8_t * UNUSED buf)
+H5S_all_select_deserialize (H5S_t *space, const uint8_t UNUSED *buf)
{
herr_t ret_value=FAIL; /* return value */
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index d5a35fa..30a1331 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -6278,7 +6278,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S_hyper_select_iterate_mem_opt(H5S_sel_iter_t * UNUSED iter, void *buf, hid_t type_id, H5S_t *space, H5D_operator_t op,
+H5S_hyper_select_iterate_mem_opt(H5S_sel_iter_t UNUSED *iter, void *buf, hid_t type_id, H5S_t *space, H5D_operator_t op,
void *op_data)
{
H5S_hyper_dim_t *diminfo; /* Alias for dataspace's diminfo information */
diff --git a/src/H5Snone.c b/src/H5Snone.c
index ed92f13..c440eea 100644
--- a/src/H5Snone.c
+++ b/src/H5Snone.c
@@ -83,7 +83,7 @@ H5S_none_select_serialize (const H5S_t *space, uint8_t *buf)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_none_select_deserialize (H5S_t *space, const uint8_t * UNUSED buf)
+H5S_none_select_deserialize (H5S_t *space, const uint8_t UNUSED *buf)
{
herr_t ret_value=FAIL; /* return value */
@@ -207,7 +207,7 @@ done:
--------------------------------------------------------------------------*/
herr_t
H5S_none_select_iterate(void * UNUSED buf, hid_t UNUSED type_id, H5S_t * UNUSED space, H5D_operator_t UNUSED op,
- void * UNUSED operator_data)
+ void UNUSED *operator_data)
{
herr_t ret_value=SUCCEED; /* return value */
diff --git a/src/H5T.c b/src/H5T.c
index c74cb29..684181a 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -1926,7 +1926,7 @@ done:
*-------------------------------------------------------------------------
*/
static int
-H5T_unlock_cb (void *_dt, hid_t UNUSED id, const void * UNUSED key)
+H5T_unlock_cb (void *_dt, hid_t UNUSED id, const void UNUSED *key)
{
H5T_t *dt = (H5T_t *)_dt;
@@ -4099,7 +4099,7 @@ H5Tget_member_index(hid_t type_id, const char *name)
int ret_value = FAIL;
int nmembs, i;
- FUNC_ENTER(H5Tget_member_index, NULL);
+ FUNC_ENTER(H5Tget_member_index, FAIL);
H5TRACE2("Is","is",type_id,name);
/* Check arguments */
diff --git a/test/big.c b/test/big.c
index 2cb17d8..26a0269 100644
--- a/test/big.c
+++ b/test/big.c
@@ -25,7 +25,7 @@ const char *FILENAME[] = {
#endif
/* Protocols */
-void usage(void);
+static void usage(void);
/*-------------------------------------------------------------------------
@@ -403,6 +403,7 @@ main (int ac, char **av)
hid_t fapl=-1;
hsize_t family_size;
hsize_t family_size_def; /* default family file size */
+ double family_size_def_dbl; /* default family file size */
int cflag=1; /* check file system before test */
/* parameters setup */
@@ -414,7 +415,8 @@ main (int ac, char **av)
/* specify a different family file size */
ac--; av++;
if (ac > 0){
- family_size_def = (hsize_t) atof(*av);
+ family_size_def_dbl = atof(*av);
+ H5_ASSIGN_OVERFLOW(family_size_def,family_size_def_dbl,double,hsize_t);
if (family_size_def <= 0)
family_size_def = (hsize_t)FAMILY_SIZE;
}
diff --git a/test/dsets.c b/test/dsets.c
index 739af4a..fd3d479 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -332,8 +332,8 @@ test_tconv(hid_t file)
*/
static size_t
bogus(unsigned int UNUSED flags, size_t UNUSED cd_nelmts,
- const unsigned int * UNUSED cd_values, size_t nbytes,
- size_t * UNUSED buf_size, void ** UNUSED buf)
+ const unsigned int UNUSED *cd_values, size_t nbytes,
+ size_t UNUSED *buf_size, void UNUSED **buf)
{
return nbytes;
}
diff --git a/test/h5test.c b/test/h5test.c
index 08de54a..e0c46a6 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -92,7 +92,7 @@ static const char *multi_letters = "msbrglo";
*-------------------------------------------------------------------------
*/
herr_t
-h5_errors(void * UNUSED client_data)
+h5_errors(void UNUSED *client_data)
{
H5_FAILED();
H5Eprint (stdout);
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 4667e72..892aa36 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -1093,7 +1093,7 @@ dump_dataspace(hid_t space)
*-------------------------------------------------------------------------
*/
static herr_t
-dump_attr(hid_t attr, const char *attr_name, void * UNUSED op_data)
+dump_attr(hid_t attr, const char *attr_name, void UNUSED *op_data)
{
hid_t attr_id, type, space;
herr_t ret = SUCCEED;
@@ -1973,7 +1973,7 @@ set_output_file(const char *fname)
*-------------------------------------------------------------------------
*/
static void
-handle_attributes(hid_t fid, char *attr, void * UNUSED data)
+handle_attributes(hid_t fid, char *attr, void UNUSED *data)
{
dump_selected_attr(fid, attr);
}
@@ -2233,7 +2233,7 @@ handle_datasets(hid_t fid, char *dset, void *data)
*-------------------------------------------------------------------------
*/
static void
-handle_groups(hid_t fid, char *group, void * UNUSED data)
+handle_groups(hid_t fid, char *group, void UNUSED *data)
{
H5G_stat_t statbuf;
hid_t gid;
@@ -2278,7 +2278,7 @@ handle_groups(hid_t fid, char *group, void * UNUSED data)
*-------------------------------------------------------------------------
*/
static void
-handle_links(hid_t fid, char *links, void * UNUSED data)
+handle_links(hid_t fid, char *links, void UNUSED *data)
{
H5G_stat_t statbuf;
@@ -2334,7 +2334,7 @@ handle_links(hid_t fid, char *links, void * UNUSED data)
*-------------------------------------------------------------------------
*/
static void
-handle_datatypes(hid_t fid, char *type, void * UNUSED data)
+handle_datatypes(hid_t fid, char *type, void UNUSED *data)
{
hid_t type_id;
@@ -3162,7 +3162,7 @@ lookup_ref_path(hobj_ref_t * ref)
*-------------------------------------------------------------------------
*/
static herr_t
-fill_ref_path_table(hid_t group, const char *name, void * UNUSED op_data)
+fill_ref_path_table(hid_t group, const char *name, void UNUSED *op_data)
{
hid_t obj;
char *tmp;
@@ -3937,7 +3937,7 @@ xml_dump_dataspace(hid_t space)
*-------------------------------------------------------------------------
*/
static void
-xml_dump_data(hid_t obj_id, int obj_data, struct subset_t * UNUSED sset)
+xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED *sset)
{
h5dump_t *outputformat = &xml_dataformat;
int status = -1;
@@ -4041,7 +4041,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t * UNUSED sset)
*-------------------------------------------------------------------------
*/
static herr_t
-xml_dump_attr(hid_t attr, const char *attr_name, void * UNUSED op_data)
+xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED *op_data)
{
hid_t attr_id, type, space;
char *t_aname = xml_escape_the_name(attr_name);
@@ -4688,7 +4688,7 @@ check_compression(hid_t dcpl)
*-------------------------------------------------------------------------
*/
static void
-xml_dump_dataset(hid_t did, const char *name, struct subset_t * UNUSED sset)
+xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED *sset)
{
hid_t type, space;
hid_t dcpl;
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index 35f5f75..ae45a02 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -1274,7 +1274,7 @@ dump_dataset_values(hid_t dset)
*-------------------------------------------------------------------------
*/
static herr_t
-list_attr (hid_t obj, const char *attr_name, void * UNUSED op_data)
+list_attr (hid_t obj, const char *attr_name, void UNUSED *op_data)
{
hid_t attr, space, type, p_type;
hsize_t size[64], nelmts=1;
@@ -1435,7 +1435,7 @@ dataset_list1(hid_t dset)
*-------------------------------------------------------------------------
*/
static herr_t
-dataset_list2(hid_t dset, const char * UNUSED name)
+dataset_list2(hid_t dset, const char UNUSED *name)
{
hid_t dcpl; /*dataset creation property list*/
hid_t type; /*data type of dataset */
@@ -1622,7 +1622,7 @@ group_list2(hid_t grp, const char *name)
*-------------------------------------------------------------------------
*/
static herr_t
-datatype_list2(hid_t type, const char * UNUSED name)
+datatype_list2(hid_t type, const char UNUSED *name)
{
if (verbose_g>0) {
printf(" %-10s ", "Type:");