diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-03-10 19:00:39 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-03-10 19:00:39 (GMT) |
commit | b4ff3e6e79a46fb474eb1786a11a7d2451455111 (patch) | |
tree | b73756af2d3eaee487c4087d55fbb04e1eba62b5 /testpar/t_mdset.c | |
parent | da5058310c324dcce93dc9328ef2bd53bf1fed02 (diff) | |
download | hdf5-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/t_mdset.c')
-rw-r--r-- | testpar/t_mdset.c | 69 |
1 files changed, 32 insertions, 37 deletions
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 ) |