summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-03-10 19:00:39 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-03-10 19:00:39 (GMT)
commitb4ff3e6e79a46fb474eb1786a11a7d2451455111 (patch)
treeb73756af2d3eaee487c4087d55fbb04e1eba62b5 /testpar
parentda5058310c324dcce93dc9328ef2bd53bf1fed02 (diff)
downloadhdf5-b4ff3e6e79a46fb474eb1786a11a7d2451455111.zip
hdf5-b4ff3e6e79a46fb474eb1786a11a7d2451455111.tar.gz
hdf5-b4ff3e6e79a46fb474eb1786a11a7d2451455111.tar.bz2
[svn-r16560] Description:
Remove another call to H5E_clear_stack() from within the library. Clean up lots of compiler warnings. Tested on: Mac OS X/32 10.5.6 (amazon) (followup on other platforms forthcoming)
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_cache.c85
-rw-r--r--testpar/t_chunk_alloc.c17
-rw-r--r--testpar/t_coll_chunk.c101
-rw-r--r--testpar/t_filter_read.c2
-rw-r--r--testpar/t_mdset.c69
-rw-r--r--testpar/t_mpi.c14
-rw-r--r--testpar/t_pflush1.c6
-rw-r--r--testpar/t_pflush2.c3
-rw-r--r--testpar/t_posix_compliant.c7
-rw-r--r--testpar/t_span_tree.c8
10 files changed, 126 insertions, 186 deletions
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 0fdd78a..ed3110a 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -276,52 +276,51 @@ MPI_Datatype mpi_mssg_t; /* for MPI derived type created from mssg */
/* stats functions */
-void print_stats(void);
-void reset_stats(void);
+static void reset_stats(void);
/* MPI setup functions */
-hbool_t set_up_file_communicator(void);
+static hbool_t set_up_file_communicator(void);
/* data array manipulation functions */
-int addr_to_datum_index(haddr_t base_addr);
-void init_data(void);
+static int addr_to_datum_index(haddr_t base_addr);
+static void init_data(void);
/* test coodination related functions */
-int do_express_test(void);
-void do_sync(void);
-int get_max_nerrors(void);
+static int do_express_test(void);
+static void do_sync(void);
+static int get_max_nerrors(void);
/* mssg xfer related functions */
-hbool_t recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset);
-hbool_t send_mssg(struct mssg_t *mssg_ptr, hbool_t add_req_to_tag);
-hbool_t setup_derived_types(void);
-hbool_t takedown_derived_types(void);
+static hbool_t recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset);
+static hbool_t send_mssg(struct mssg_t *mssg_ptr, hbool_t add_req_to_tag);
+static hbool_t setup_derived_types(void);
+static hbool_t takedown_derived_types(void);
/* server functions */
-hbool_t server_main(void);
-hbool_t serve_read_request(struct mssg_t * mssg_ptr);
-hbool_t serve_sync_request(struct mssg_t * mssg_ptr);
-hbool_t serve_write_request(struct mssg_t * mssg_ptr);
+static hbool_t server_main(void);
+static hbool_t serve_read_request(struct mssg_t * mssg_ptr);
+static hbool_t serve_sync_request(struct mssg_t * mssg_ptr);
+static hbool_t serve_write_request(struct mssg_t * mssg_ptr);
/* call back functions & related data structures */
-herr_t clear_datum(H5F_t * f, void * thing, hbool_t dest);
-herr_t destroy_datum(H5F_t UNUSED * f, void * thing);
-herr_t flush_datum(H5F_t *f, hid_t UNUSED dxpl_id, hbool_t dest, haddr_t addr,
+static herr_t clear_datum(H5F_t * f, void * thing, hbool_t dest);
+static herr_t destroy_datum(H5F_t UNUSED * f, void * thing);
+static herr_t flush_datum(H5F_t *f, hid_t UNUSED dxpl_id, hbool_t dest, haddr_t addr,
void *thing);
-void * load_datum(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr,
+static void * load_datum(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr,
const void UNUSED *udata1, void UNUSED *udata2);
-herr_t size_datum(H5F_t UNUSED * f, void * thing, size_t * size_ptr);
+static herr_t size_datum(H5F_t UNUSED * f, void * thing, size_t * size_ptr);
#define DATUM_ENTRY_TYPE H5AC_TEST_ID
@@ -398,6 +397,7 @@ hbool_t trace_file_check(void);
/****************************** stats functions ******************************/
/*****************************************************************************/
+#ifdef UNUSED
/*****************************************************************************
*
* Function: print_stats()
@@ -417,7 +417,7 @@ hbool_t trace_file_check(void);
*
*****************************************************************************/
-void
+static void
print_stats(void)
{
HDfprintf(stdout,
@@ -436,6 +436,7 @@ print_stats(void)
return;
} /* print_stats() */
+#endif /* UNUSED */
/*****************************************************************************
*
@@ -453,7 +454,7 @@ print_stats(void)
*
*****************************************************************************/
-void
+static void
reset_stats(void)
{
datum_clears = 0;
@@ -494,7 +495,7 @@ reset_stats(void)
*
*****************************************************************************/
-hbool_t
+static hbool_t
set_up_file_communicator(void)
{
const char * fcn_name = "set_up_file_communicator()";
@@ -647,7 +648,7 @@ set_up_file_communicator(void)
*
*****************************************************************************/
-int
+static int
addr_to_datum_index(haddr_t base_addr)
{
/* const char * fcn_name = "addr_to_datum_index()"; */
@@ -704,7 +705,7 @@ addr_to_datum_index(haddr_t base_addr)
*
*****************************************************************************/
-void
+static void
init_data(void)
{
/* const char * fcn_name = "init_data()"; */
@@ -785,7 +786,7 @@ init_data(void)
*
*****************************************************************************/
-int
+static int
do_express_test(void)
{
const char * fcn_name = "do_express_test()";
@@ -839,7 +840,7 @@ do_express_test(void)
*
*****************************************************************************/
-void
+static void
do_sync(void)
{
const char * fcn_name = "do_sync()";
@@ -915,7 +916,7 @@ do_sync(void)
*
*****************************************************************************/
-int
+static int
get_max_nerrors(void)
{
const char * fcn_name = "get_max_nerrors()";
@@ -970,7 +971,7 @@ get_max_nerrors(void)
#define CACHE_TEST_TAG 99 /* different from any used by the library */
-hbool_t
+static hbool_t
recv_mssg(struct mssg_t *mssg_ptr,
int mssg_tag_offset)
{
@@ -1055,7 +1056,7 @@ recv_mssg(struct mssg_t *mssg_ptr,
*
*****************************************************************************/
-hbool_t
+static hbool_t
send_mssg(struct mssg_t *mssg_ptr,
hbool_t add_req_to_tag)
{
@@ -1129,7 +1130,7 @@ send_mssg(struct mssg_t *mssg_ptr,
*
*****************************************************************************/
-hbool_t
+static hbool_t
setup_derived_types(void)
{
const char * fcn_name = "setup_derived_types()";
@@ -1223,7 +1224,7 @@ setup_derived_types(void)
*
*****************************************************************************/
-hbool_t
+static hbool_t
takedown_derived_types(void)
{
const char * fcn_name = "takedown_derived_types()";
@@ -1275,7 +1276,7 @@ takedown_derived_types(void)
*
*****************************************************************************/
-hbool_t
+static hbool_t
server_main(void)
{
const char * fcn_name = "server_main()";
@@ -1382,7 +1383,7 @@ server_main(void)
*
*****************************************************************************/
-hbool_t
+static hbool_t
serve_read_request(struct mssg_t * mssg_ptr)
{
const char * fcn_name = "serve_read_request()";
@@ -1488,7 +1489,7 @@ serve_read_request(struct mssg_t * mssg_ptr)
*
*****************************************************************************/
-hbool_t
+static hbool_t
serve_sync_request(struct mssg_t * mssg_ptr)
{
const char * fcn_name = "serve_sync_request()";
@@ -1556,7 +1557,7 @@ serve_sync_request(struct mssg_t * mssg_ptr)
*
*****************************************************************************/
-hbool_t
+static hbool_t
serve_write_request(struct mssg_t * mssg_ptr)
{
const char * fcn_name = "serve_write_request()";
@@ -1682,7 +1683,7 @@ serve_write_request(struct mssg_t * mssg_ptr)
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
clear_datum(H5F_t * f,
void * thing,
hbool_t dest)
@@ -1756,7 +1757,7 @@ clear_datum(H5F_t * f,
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
destroy_datum(H5F_t UNUSED * f,
void * thing)
{
@@ -1822,7 +1823,7 @@ destroy_datum(H5F_t UNUSED * f,
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
flush_datum(H5F_t *f,
hid_t UNUSED dxpl_id,
hbool_t dest,
@@ -1959,7 +1960,7 @@ flush_datum(H5F_t *f,
*-------------------------------------------------------------------------
*/
-void *
+static void *
load_datum(H5F_t UNUSED *f,
hid_t UNUSED dxpl_id,
haddr_t addr,
@@ -2129,7 +2130,7 @@ load_datum(H5F_t UNUSED *f,
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
size_datum(H5F_t UNUSED * f,
void * thing,
size_t * size_ptr)
diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c
index 5d02822..a0cf0e2 100644
--- a/testpar/t_chunk_alloc.c
+++ b/testpar/t_chunk_alloc.c
@@ -82,7 +82,7 @@ typedef enum access_ {
* elements. The allocation time is set to H5D_ALLOC_TIME_EARLY. Another
* routine will open this in parallel for extension test.
*/
-void
+static void
create_chunked_dataset(const char *filename, int nchunks, write_type write_pattern)
{
hid_t file_id, dataset; /* handles */
@@ -98,7 +98,6 @@ create_chunked_dataset(const char *filename, int nchunks, write_type write_patte
hsize_t offset[1]; /* Selection offset within dataspace */
/* Variables used in reading data back */
char buffer[CHUNKSIZE];
- int i;
herr_t hrc;
@@ -195,7 +194,7 @@ create_chunked_dataset(const char *filename, int nchunks, write_type write_patte
* opens the dataset. At the end, it verifies the size of the dataset to be
* consistent with argument 'nchunks'.
*/
-void
+static void
parallel_access_dataset(const char *filename, int nchunks, access_type action, hid_t *file_id, hid_t *dataset)
{
/* HDF5 gubbins */
@@ -203,7 +202,6 @@ parallel_access_dataset(const char *filename, int nchunks, access_type action, h
hid_t access_plist; /* HDF5 ID for file access property list */
herr_t hrc; /* HDF5 return code */
hsize_t size[1];
- hsize_t dim_size;
hsize_t chunk_dims[1] ={CHUNKSIZE};
hsize_t count[1];
@@ -217,7 +215,6 @@ parallel_access_dataset(const char *filename, int nchunks, access_type action, h
/* MPI Gubbins */
MPI_Offset filesize, /* actual file size */
est_filesize; /* estimated file size */
- int mpierr;
/* Initialize MPI */
MPI_Comm_size(MPI_COMM_WORLD,&mpi_size);
@@ -328,7 +325,8 @@ parallel_access_dataset(const char *filename, int nchunks, access_type action, h
* 3. it returns correct values when the whole dataset has been written in an
* interleaved pattern.
*/
-void verify_data(const char *filename, int nchunks, write_type write_pattern, int close, hid_t *file_id, hid_t *dataset)
+static void
+verify_data(const char *filename, int nchunks, write_type write_pattern, int close, hid_t *file_id, hid_t *dataset)
{
/* HDF5 gubbins */
hid_t dataspace, memspace; /* HDF5 file identifier */
@@ -343,12 +341,7 @@ void verify_data(const char *filename, int nchunks, write_type write_pattern, in
/* Variables used in reading data back */
char buffer[CHUNKSIZE];
int value, i;
- int index, current;
-
- /* MPI Gubbins */
- MPI_Offset filesize, /* actual file size */
- est_filesize; /* estimated file size */
- int mpierr;
+ int index;
/* Initialize MPI */
MPI_Comm_size(MPI_COMM_WORLD,&mpi_size);
diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c
index fe0405e..61e7bfd 100644
--- a/testpar/t_coll_chunk.c
+++ b/testpar/t_coll_chunk.c
@@ -71,12 +71,9 @@ static void coll_chunktest(const char* filename,int chunk_factor,int select_fact
void
coll_chunk1(void)
{
+ const char *filename = GetTestParameters();
- const char *filename;
-
- filename = GetTestParameters();
- coll_chunktest(filename,1,BYROW_CONT,API_NONE);
-
+ coll_chunktest(filename, 1, BYROW_CONT, API_NONE);
}
@@ -118,12 +115,9 @@ coll_chunk1(void)
void
coll_chunk2(void)
{
+ const char *filename = GetTestParameters();
- const char *filename;
-
- filename = GetTestParameters();
- coll_chunktest(filename,1,BYROW_DISCONT,API_NONE);
-
+ coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE);
}
@@ -166,16 +160,11 @@ coll_chunk2(void)
void
coll_chunk3(void)
{
+ const char *filename = GetTestParameters();
+ int mpi_size;
- const char *filename;
- int mpi_size;
-
- MPI_Comm comm = MPI_COMM_WORLD;
- MPI_Comm_size(comm,&mpi_size);
-
- filename = GetTestParameters();
- coll_chunktest(filename,mpi_size,BYROW_CONT,API_NONE);
-
+ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
+ coll_chunktest(filename, mpi_size, BYROW_CONT, API_NONE);
}
/*-------------------------------------------------------------------------
@@ -217,15 +206,9 @@ coll_chunk3(void)
void
coll_chunk4(void)
{
+ const char *filename = GetTestParameters();
- const char *filename;
- int mpi_size;
-
- MPI_Comm comm = MPI_COMM_WORLD;
-
- filename = GetTestParameters();
- coll_chunktest(filename,1,BYROW_SELECTNONE,API_NONE);
-
+ coll_chunktest(filename, 1, BYROW_SELECTNONE, API_NONE);
}
/*-------------------------------------------------------------------------
@@ -267,15 +250,9 @@ coll_chunk4(void)
void
coll_chunk5(void)
{
+ const char *filename = GetTestParameters();
- const char *filename;
- int mpi_size;
-
- MPI_Comm comm = MPI_COMM_WORLD;
-
- filename = GetTestParameters();
- coll_chunktest(filename,4,BYROW_SELECTUNBALANCE,API_LINK_HARD);
-
+ coll_chunktest(filename, 4, BYROW_SELECTUNBALANCE, API_LINK_HARD);
}
/*-------------------------------------------------------------------------
@@ -317,15 +294,9 @@ coll_chunk5(void)
void
coll_chunk6(void)
{
+ const char *filename = GetTestParameters();
- const char *filename;
- int mpi_size;
-
- MPI_Comm comm = MPI_COMM_WORLD;
-
- filename = GetTestParameters();
- coll_chunktest(filename,4,BYROW_SELECTUNBALANCE,API_MULTI_HARD);
-
+ coll_chunktest(filename, 4, BYROW_SELECTUNBALANCE, API_MULTI_HARD);
}
/*-------------------------------------------------------------------------
@@ -367,15 +338,9 @@ coll_chunk6(void)
void
coll_chunk7(void)
{
+ const char *filename = GetTestParameters();
- const char *filename;
- int mpi_size;
-
- MPI_Comm comm = MPI_COMM_WORLD;
-
- filename = GetTestParameters();
- coll_chunktest(filename,4,BYROW_SELECTUNBALANCE,API_LINK_TRUE);
-
+ coll_chunktest(filename, 4, BYROW_SELECTUNBALANCE, API_LINK_TRUE);
}
/*-------------------------------------------------------------------------
@@ -417,15 +382,9 @@ coll_chunk7(void)
void
coll_chunk8(void)
{
+ const char *filename = GetTestParameters();
- const char *filename;
- int mpi_size;
-
- MPI_Comm comm = MPI_COMM_WORLD;
-
- filename = GetTestParameters();
- coll_chunktest(filename,4,BYROW_SELECTUNBALANCE,API_LINK_FALSE);
-
+ coll_chunktest(filename, 4, BYROW_SELECTUNBALANCE, API_LINK_FALSE);
}
/*-------------------------------------------------------------------------
@@ -467,15 +426,9 @@ coll_chunk8(void)
void
coll_chunk9(void)
{
+ const char *filename = GetTestParameters();
- const char *filename;
- int mpi_size;
-
- MPI_Comm comm = MPI_COMM_WORLD;
-
- filename = GetTestParameters();
- coll_chunktest(filename,4,BYROW_SELECTUNBALANCE,API_MULTI_COLL);
-
+ coll_chunktest(filename, 4, BYROW_SELECTUNBALANCE, API_MULTI_COLL);
}
/*-------------------------------------------------------------------------
@@ -517,15 +470,9 @@ coll_chunk9(void)
void
coll_chunk10(void)
{
+ const char *filename = GetTestParameters();
- const char *filename;
- int mpi_size;
-
- MPI_Comm comm = MPI_COMM_WORLD;
-
- filename = GetTestParameters();
- coll_chunktest(filename,4,BYROW_SELECTINCHUNK,API_MULTI_IND);
-
+ coll_chunktest(filename, 4, BYROW_SELECTINCHUNK, API_MULTI_IND);
}
@@ -555,8 +502,8 @@ static void
coll_chunktest(const char* filename,
int chunk_factor,
int select_factor,
- int api_option) {
-
+ int api_option)
+{
hid_t file,dataset, file_dataspace;
hid_t acc_plist,xfer_plist,crp_plist;
diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c
index aa642b4..f38b30e 100644
--- a/testpar/t_filter_read.c
+++ b/testpar/t_filter_read.c
@@ -210,7 +210,7 @@ filter_read_internal(const char *filename, hid_t dcpl,
void
test_filter_read(void)
{
- hid_t dc,file; /* HDF5 IDs */
+ hid_t dc; /* HDF5 IDs */
const hsize_t chunk_size[2] = {CHUNK_DIM1, CHUNK_DIM2}; /* Chunk dimensions */
hsize_t null_size; /* Size of dataset without filters */
herr_t hrc;
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c
index c4b319a..f7d7ebb 100644
--- a/testpar/t_mdset.c
+++ b/testpar/t_mdset.c
@@ -22,16 +22,16 @@
enum obj_type { is_group, is_dset };
-int get_size(void);
-void write_dataset(hid_t, hid_t, hid_t);
-int read_dataset(hid_t, hid_t, hid_t);
-void create_group_recursive(hid_t, hid_t, hid_t, int);
-void recursive_read_group(hid_t, hid_t, hid_t, int);
-void group_dataset_read(hid_t fid, int mpi_rank, int m);
-void write_attribute(hid_t, int, int);
-int read_attribute(hid_t, int, int);
-int check_value(DATATYPE *, DATATYPE *, int);
-void get_slab(hsize_t[], hsize_t[], hsize_t[], hsize_t[], int);
+static int get_size(void);
+static void write_dataset(hid_t, hid_t, hid_t);
+static int read_dataset(hid_t, hid_t, hid_t);
+static void create_group_recursive(hid_t, hid_t, hid_t, int);
+static void recursive_read_group(hid_t, hid_t, hid_t, int);
+static void group_dataset_read(hid_t fid, int mpi_rank, int m);
+static void write_attribute(hid_t, int, int);
+static int read_attribute(hid_t, int, int);
+static int check_value(DATATYPE *, DATATYPE *, int);
+static void get_slab(hsize_t[], hsize_t[], hsize_t[], hsize_t[], int);
/*
@@ -44,7 +44,8 @@ void get_slab(hsize_t[], hsize_t[], hsize_t[], hsize_t[], int);
* JRM - 8/11/04
*/
-int get_size(void)
+static int
+get_size(void)
{
int mpi_rank;
int mpi_size;
@@ -867,7 +868,8 @@ void independent_group_read(void)
*
* JRM - 8/16/04
*/
-void group_dataset_read(hid_t fid, int mpi_rank, int m)
+static void
+group_dataset_read(hid_t fid, int mpi_rank, int m)
{
int ret, i, j, size;
char gname[64], dname[32];
@@ -1035,7 +1037,8 @@ void multiple_group_write(void)
*
* JRM - 8/16/04
*/
-void write_dataset(hid_t memspace, hid_t filespace, hid_t gid)
+static void
+write_dataset(hid_t memspace, hid_t filespace, hid_t gid)
{
int i, j, n, size;
int mpi_rank, mpi_size;
@@ -1074,8 +1077,8 @@ void write_dataset(hid_t memspace, hid_t filespace, hid_t gid)
* Creates subgroups of depth GROUP_DEPTH recursively. Also writes datasets
* in parallel in each group.
*/
-void create_group_recursive(hid_t memspace, hid_t filespace, hid_t gid,
- int counter)
+static void
+create_group_recursive(hid_t memspace, hid_t filespace, hid_t gid, int counter)
{
hid_t child_gid;
int mpi_rank;
@@ -1196,7 +1199,8 @@ void multiple_group_read(void)
*
* JRM - 8/11/04
*/
-int read_dataset(hid_t memspace, hid_t filespace, hid_t gid)
+static int
+read_dataset(hid_t memspace, hid_t filespace, hid_t gid)
{
int i, j, n, mpi_rank, mpi_size, size, attr_errors=0, vrfy_errors=0;
char dname[32];
@@ -1250,8 +1254,8 @@ int read_dataset(hid_t memspace, hid_t filespace, hid_t gid)
* This recursive function opens all the groups in vertical direction and
* checks the data.
*/
-void recursive_read_group(hid_t memspace, hid_t filespace, hid_t gid,
- int counter)
+static void
+recursive_read_group(hid_t memspace, hid_t filespace, hid_t gid, int counter)
{
hid_t child_gid;
int mpi_rank, err_num=0;
@@ -1278,7 +1282,8 @@ void recursive_read_group(hid_t memspace, hid_t filespace, hid_t gid,
/* Create and write attribute for a group or a dataset. For groups, attribute
* is a scalar datum; for dataset, it is a one-dimensional array.
*/
-void write_attribute(hid_t obj_id, int this_type, int num)
+static void
+write_attribute(hid_t obj_id, int this_type, int num)
{
hid_t sid, aid;
hsize_t dspace_dims[1]={8};
@@ -1309,7 +1314,8 @@ void write_attribute(hid_t obj_id, int this_type, int num)
}
/* Read and verify attribute for group or dataset. */
-int read_attribute(hid_t obj_id, int this_type, int num)
+static int
+read_attribute(hid_t obj_id, int this_type, int num)
{
hid_t aid;
hsize_t group_block[2]={1,1}, dset_block[2]={1, 8};
@@ -1351,7 +1357,8 @@ int read_attribute(hid_t obj_id, int this_type, int num)
*
* JRM - 8/16/04
*/
-int check_value(DATATYPE *indata, DATATYPE *outdata, int size)
+static int
+check_value(DATATYPE *indata, DATATYPE *outdata, int size)
{
int mpi_rank, mpi_size, err_num=0;
hsize_t i, j;
@@ -1387,11 +1394,9 @@ int check_value(DATATYPE *indata, DATATYPE *outdata, int size)
* JRM - 8/11/04
*/
-void get_slab(hsize_t chunk_origin[],
- hsize_t chunk_dims[],
- hsize_t count[],
- hsize_t file_dims[],
- int size)
+static void
+get_slab(hsize_t chunk_origin[], hsize_t chunk_dims[], hsize_t count[],
+ hsize_t file_dims[], int size)
{
int mpi_rank, mpi_size;
@@ -1450,10 +1455,6 @@ void io_mode_confusion(void)
hsize_t dimsf[1]; /* dataset dimensions */
int data[N] = {1}; /* pointer to data buffer to write */
hsize_t coord[N] = {0L,1L,2L,3L};
- hsize_t start[1];
- hsize_t stride[1];
- hsize_t count[1];
- hsize_t block[1];
hid_t plist_id; /* property list identifier */
herr_t status;
@@ -1579,11 +1580,6 @@ void io_mode_confusion(void)
VRFY((filespace >= 0 ), "H5Dget_space() failed");
- start[0] = 0L;
- stride[0] = 1;
- count[0] = 1;
- block[0] = N;
-
/* select all */
if(mpi_rank == 0 ) {
if(verbose )
@@ -1591,8 +1587,7 @@ void io_mode_confusion(void)
"%0d:%s: Calling H5Sselect_elements() -- set up hang?\n",
mpi_rank, fcn_name);
- status = H5Sselect_elements(filespace, H5S_SELECT_SET, N,
- &coord);
+ status = H5Sselect_elements(filespace, H5S_SELECT_SET, N, (const hsize_t *)&coord);
VRFY((status >= 0 ), "H5Sselect_elements() failed");
} else { /* select nothing */
if(verbose )
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index 14ba6c6..2195c32 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -697,10 +697,10 @@ static int test_mpio_derived_dtype(char *filename) {
MPI_Datatype etype,filetype;
MPI_Datatype adv_filetype,bas_filetype[2];
MPI_Datatype etypenew, filetypenew;
- MPI_Offset disp,dispnew;
+ MPI_Offset disp;
MPI_Status Status;
MPI_Aint adv_disp[2];
- MPI_Aint offsets[1],adv_offsets[2];
+ MPI_Aint offsets[1];
int blocklens[1],adv_blocklens[2];
int count,outcount;
int retcode;
@@ -896,9 +896,9 @@ If it turns out that the previous working MPI-IO package no longer works, this t
we can turn off the support for special collective IO; currently only special collective IO.
*/
-static int test_mpio_special_collective(char *filename) {
-
- char hostname[128];
+static int
+test_mpio_special_collective(char *filename)
+{
int mpi_size, mpi_rank;
MPI_File fh;
MPI_Datatype etype,buftype,filetype;
@@ -907,12 +907,10 @@ static int test_mpio_special_collective(char *filename) {
int mpi_err;
char writedata[2];
char *buf;
- char expect_val;
- int i, irank;
+ int i;
int count,bufcount;
int blocklens[2];
MPI_Aint offsets[2];
- int nerrors = 0; /* number of errors */
MPI_Offset mpi_off;
MPI_Status mpi_stat;
int retcode;
diff --git a/testpar/t_pflush1.c b/testpar/t_pflush1.c
index 29d5c58..0773b93 100644
--- a/testpar/t_pflush1.c
+++ b/testpar/t_pflush1.c
@@ -50,7 +50,8 @@ static double the_data[100][100];
*
*-------------------------------------------------------------------------
*/
-hid_t create_file(char* name, hid_t fapl)
+static hid_t
+create_file(char* name, hid_t fapl)
{
hid_t file, dcpl, space, dset, groups, grp, plist;
hsize_t ds_size[2] = {100, 100};
@@ -121,8 +122,7 @@ int
main(int argc, char* argv[])
{
hid_t file1, file2, fapl;
- MPI_File mpifh=-2;
- int *mpifh_p = NULL;
+ MPI_File *mpifh_p = NULL;
char name[1024];
const char *envval = NULL;
int mpi_size, mpi_rank;
diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c
index 82c112f..a570d4c 100644
--- a/testpar/t_pflush2.c
+++ b/testpar/t_pflush2.c
@@ -49,7 +49,8 @@ static double the_data[100][100];
*
*-------------------------------------------------------------------------
*/
-int check_file(char* name, hid_t fapl)
+static int
+check_file(char* name, hid_t fapl)
{
hid_t file, space, dset, groups, grp, plist;
hsize_t ds_size[2];
diff --git a/testpar/t_posix_compliant.c b/testpar/t_posix_compliant.c
index a4b8a86..1be3e99 100644
--- a/testpar/t_posix_compliant.c
+++ b/testpar/t_posix_compliant.c
@@ -701,7 +701,8 @@ static int find_writesize(int rank, int numprocs, int size)
return write_size;
}
-static void vrfy_elements(int* a, int* b, int size, int rank)
+static void
+vrfy_elements(int* a, int* b, int size, int rank)
{
int i, counter = 0;
@@ -725,6 +726,7 @@ static void vrfy_elements(int* a, int* b, int size, int rank)
/* print an explanation message by MAIN (0) process.
*/
+static void
header_msg(void)
{
printf(
@@ -736,7 +738,8 @@ header_msg(void)
);
}
-int main(int argc, char* argv[])
+int
+main(int argc, char* argv[])
{
int numprocs, rank, opt, mpi_tests=1, posix_tests=1;
diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c
index 800ad41..667872c 100644
--- a/testpar/t_span_tree.c
+++ b/testpar/t_span_tree.c
@@ -248,7 +248,7 @@ void coll_write_test(int chunk_factor)
hsize_t chunk_dims[2];
herr_t ret;
- unsigned i,j;
+ unsigned i;
int fillvalue = 0; /* Fill value for the dataset */
#if 0
@@ -689,7 +689,8 @@ void coll_write_test(int chunk_factor)
coll_write_test.
*-------------------------------------------------------------------------
*/
-void coll_read_test(int chunk_factor)
+static void
+coll_read_test(int chunk_factor)
{
const char *filename;
@@ -713,7 +714,7 @@ void coll_read_test(int chunk_factor)
hsize_t block[2]; /* Block sizes */
herr_t ret;
- unsigned i,j;
+ unsigned i;
int *matrix_out;
int *matrix_out1;
@@ -932,3 +933,4 @@ void coll_read_test(int chunk_factor)
return ;
}
+