summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/tarray.c4
-rw-r--r--test/tattr.c497
-rw-r--r--test/tcheck_version.c6
-rw-r--r--test/tcoords.c2
-rw-r--r--test/testframe.c14
-rw-r--r--test/testhdf5.h24
-rw-r--r--test/tfile.c128
-rw-r--r--test/tgenprop.c14
-rw-r--r--test/th5_system.c10
-rw-r--r--test/th5o.c8
-rw-r--r--test/th5s.c28
-rw-r--r--test/tid.c2
-rw-r--r--test/titerate.c24
-rw-r--r--test/tmeta.c4
-rw-r--r--test/tmisc.c122
-rw-r--r--test/trefer.c10
-rw-r--r--test/trefer_deprec.c10
-rw-r--r--test/tselect.c78
-rw-r--r--test/tsohm.c71
-rw-r--r--test/tvltypes.c6
-rw-r--r--test/twriteorder.c4
21 files changed, 534 insertions, 532 deletions
diff --git a/test/tarray.c b/test/tarray.c
index 615df7b..5978d9f 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -239,14 +239,14 @@ test_array_funcs(void)
{
cset = H5Tget_cset(type);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(cset, FAIL, "H5Tget_cset");
H5E_BEGIN_TRY
{
strpad = H5Tget_strpad(type);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(strpad, FAIL, "H5Tget_strpad");
/* Close datatype */
diff --git a/test/tattr.c b/test/tattr.c
index f6e3a39..45f9865 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -76,24 +76,25 @@
#define ATTR1_NAME "Attr1"
#define ATTR1_RANK 1
#define ATTR1_DIM1 3
-int attr_data1[ATTR1_DIM1] = {512, -234, 98123}; /* Test data for 1st attribute */
+static int attr_data1[ATTR1_DIM1] = {512, -234, 98123}; /* Test data for 1st attribute */
/* rank & dimensions for another attribute */
#define ATTR1A_NAME "Attr1_a"
-int attr_data1a[ATTR1_DIM1] = {256, 11945, -22107};
+static int attr_data1a[ATTR1_DIM1] = {256, 11945, -22107};
#define ATTR2_NAME "Attr2"
#define ATTR2_RANK 2
#define ATTR2_DIM1 2
#define ATTR2_DIM2 2
-int attr_data2[ATTR2_DIM1][ATTR2_DIM2] = {{7614, -416}, {197814, -3}}; /* Test data for 2nd attribute */
+static int attr_data2[ATTR2_DIM1][ATTR2_DIM2] = {{7614, -416},
+ {197814, -3}}; /* Test data for 2nd attribute */
#define ATTR3_NAME "Attr3"
#define ATTR3_RANK 3
#define ATTR3_DIM1 2
#define ATTR3_DIM2 2
#define ATTR3_DIM3 2
-double attr_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3] = {
+static double attr_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3] = {
{{2.3, -26.1}, {0.123, -10.0}}, {{973.23, -0.91827}, {2.0, 23.0}}}; /* Test data for 3rd attribute */
#define ATTR4_NAME "Attr4"
@@ -103,10 +104,10 @@ double attr_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3] = {
#define ATTR4_FIELDNAME1 "i"
#define ATTR4_FIELDNAME2 "d"
#define ATTR4_FIELDNAME3 "c"
-size_t attr4_field1_off = 0;
-size_t attr4_field2_off = 0;
-size_t attr4_field3_off = 0;
-struct attr4_struct {
+static size_t attr4_field1_off = 0;
+static size_t attr4_field2_off = 0;
+static size_t attr4_field3_off = 0;
+static struct attr4_struct {
int i;
double d;
char c;
@@ -116,7 +117,7 @@ struct attr4_struct {
#define ATTR5_NAME "Attr5"
#define ATTR5_RANK 0
-float attr_data5 = -5.123F; /* Test data for 5th attribute */
+static float attr_data5 = -5.123F; /* Test data for 5th attribute */
#define ATTR6_RANK 3
#define ATTR6_DIM1 100
@@ -4540,21 +4541,21 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
static void
test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Compact Storage of Attributes with Creation Order Info\n"));
@@ -4742,23 +4743,23 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
static void
test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Dense Storage of Attributes with Creation Order Info\n"));
@@ -5079,23 +5080,23 @@ test_attr_corder_create_reopen(hid_t fcpl, hid_t fapl)
static void
test_attr_corder_transition(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Storage Transitions of Attributes with Creation Order Info\n"));
@@ -5488,24 +5489,24 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
static void
test_attr_corder_delete(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- unsigned reopen_file; /* Whether to re-open the file before deleting group */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ unsigned reopen_file; /* Whether to re-open the file before deleting group */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Deleting Object w/Dense Attribute Storage and Creation Order Info\n"));
@@ -5807,26 +5808,26 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
static void
test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- H5A_info_t ainfo; /* Attribute information */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- unsigned use_index; /* Use index on creation order values */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ H5A_info_t ainfo; /* Attribute information */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ unsigned use_index; /* Use index on creation order values */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -5850,9 +5851,9 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
for (use_index = FALSE; use_index <= TRUE; use_index++) {
/* Output message about test being performed */
if (use_index)
- MESSAGE(5, ("Testing Querying Attribute Info By Index w/Creation Order Index\n"))
+ MESSAGE(5, ("Testing Querying Attribute Info By Index w/Creation Order Index\n"));
else
- MESSAGE(5, ("Testing Querying Attribute Info By Index w/o Creation Order Index\n"))
+ MESSAGE(5, ("Testing Querying Attribute Info By Index w/o Creation Order Index\n"));
/* Create file */
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
@@ -6085,7 +6086,7 @@ test_attr_info_null_info_pointer(hid_t fcpl, hid_t fapl)
{
err_ret = H5Aget_info(attr, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
CHECK(err_ret, SUCCEED, "H5Aget_info");
@@ -6093,7 +6094,7 @@ test_attr_info_null_info_pointer(hid_t fcpl, hid_t fapl)
{
err_ret = H5Aget_info_by_name(fid, ".", GET_INFO_NULL_POINTER_ATTR_NAME, NULL, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
CHECK(err_ret, SUCCEED, "H5Aget_info_by_name");
@@ -6101,7 +6102,7 @@ test_attr_info_null_info_pointer(hid_t fcpl, hid_t fapl)
{
err_ret = H5Aget_info_by_idx(fid, ".", H5_INDEX_NAME, H5_ITER_INC, 0, NULL, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
CHECK(err_ret, SUCCEED, "H5Aget_info_by_idx");
@@ -6149,7 +6150,7 @@ test_attr_rename_invalid_name(hid_t fcpl, hid_t fapl)
{
err_ret = H5Arename(fid, NULL, INVALID_RENAME_TEST_NEW_ATTR_NAME);
}
- H5E_END_TRY;
+ H5E_END_TRY
CHECK(err_ret, SUCCEED, "H5Arename");
@@ -6157,7 +6158,7 @@ test_attr_rename_invalid_name(hid_t fcpl, hid_t fapl)
{
err_ret = H5Arename(fid, "", INVALID_RENAME_TEST_NEW_ATTR_NAME);
}
- H5E_END_TRY;
+ H5E_END_TRY
CHECK(err_ret, SUCCEED, "H5Arename");
@@ -6165,7 +6166,7 @@ test_attr_rename_invalid_name(hid_t fcpl, hid_t fapl)
{
err_ret = H5Arename(fid, INVALID_RENAME_TEST_ATTR_NAME, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
CHECK(err_ret, SUCCEED, "H5Arename");
@@ -6173,7 +6174,7 @@ test_attr_rename_invalid_name(hid_t fcpl, hid_t fapl)
{
err_ret = H5Arename(fid, INVALID_RENAME_TEST_ATTR_NAME, "");
}
- H5E_END_TRY;
+ H5E_END_TRY
CHECK(err_ret, SUCCEED, "H5Arename");
@@ -6181,7 +6182,7 @@ test_attr_rename_invalid_name(hid_t fcpl, hid_t fapl)
{
err_ret = H5Arename_by_name(fid, ".", NULL, INVALID_RENAME_TEST_NEW_ATTR_NAME, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
CHECK(err_ret, SUCCEED, "H5Arename_by_name");
@@ -6189,7 +6190,7 @@ test_attr_rename_invalid_name(hid_t fcpl, hid_t fapl)
{
err_ret = H5Arename_by_name(fid, ".", "", INVALID_RENAME_TEST_NEW_ATTR_NAME, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
CHECK(err_ret, SUCCEED, "H5Arename_by_name");
@@ -6197,7 +6198,7 @@ test_attr_rename_invalid_name(hid_t fcpl, hid_t fapl)
{
err_ret = H5Arename_by_name(fid, ".", INVALID_RENAME_TEST_ATTR_NAME, NULL, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
CHECK(err_ret, SUCCEED, "H5Arename_by_name");
@@ -6205,7 +6206,7 @@ test_attr_rename_invalid_name(hid_t fcpl, hid_t fapl)
{
err_ret = H5Arename_by_name(fid, ".", INVALID_RENAME_TEST_ATTR_NAME, "", H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
CHECK(err_ret, SUCCEED, "H5Arename_by_name");
@@ -6255,7 +6256,7 @@ test_attr_get_name_invalid_buf(hid_t fcpl, hid_t fapl)
{
err_ret = H5Aget_name(attr, 1, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(err_ret, FAIL, "H5Aget_name");
@@ -6263,7 +6264,7 @@ test_attr_get_name_invalid_buf(hid_t fcpl, hid_t fapl)
{
err_ret = H5Aget_name_by_idx(fid, ".", H5_INDEX_NAME, H5_ITER_INC, 0, NULL, 1, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(err_ret, FAIL, "H5Aget_name_by_idx");
@@ -6289,30 +6290,30 @@ test_attr_get_name_invalid_buf(hid_t fcpl, hid_t fapl)
static void
test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- H5A_info_t ainfo; /* Attribute information */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
-
- MESSAGE(5, ("Testing Deleting Attribute By Index\n"))
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ H5A_info_t ainfo; /* Attribute information */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
+
+ MESSAGE(5, ("Testing Deleting Attribute By Index\n"));
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -6343,36 +6344,36 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
if (order == H5_ITER_INC) {
if (use_index)
MESSAGE(5, ("Testing Deleting Attribute By Creation Order Index in Increasing "
- "Order w/Creation Order Index\n"))
+ "Order w/Creation Order Index\n"));
else
MESSAGE(5, ("Testing Deleting Attribute By Creation Order Index in Increasing "
- "Order w/o Creation Order Index\n"))
+ "Order w/o Creation Order Index\n"));
} /* end if */
else {
if (use_index)
MESSAGE(5, ("Testing Deleting Attribute By Creation Order Index in Decreasing "
- "Order w/Creation Order Index\n"))
+ "Order w/Creation Order Index\n"));
else
MESSAGE(5, ("Testing Deleting Attribute By Creation Order Index in Decreasing "
- "Order w/o Creation Order Index\n"))
+ "Order w/o Creation Order Index\n"));
} /* end else */
} /* end if */
else {
if (order == H5_ITER_INC) {
if (use_index)
MESSAGE(5, ("Testing Deleting Attribute By Name Index in Increasing Order "
- "w/Creation Order Index\n"))
+ "w/Creation Order Index\n"));
else
MESSAGE(5, ("Testing Deleting Attribute By Name Index in Increasing Order w/o "
- "Creation Order Index\n"))
+ "Creation Order Index\n"));
} /* end if */
else {
if (use_index)
MESSAGE(5, ("Testing Deleting Attribute By Name Index in Decreasing Order "
- "w/Creation Order Index\n"))
+ "w/Creation Order Index\n"));
else
MESSAGE(5, ("Testing Deleting Attribute By Name Index in Decreasing Order w/o "
- "Creation Order Index\n"))
+ "Creation Order Index\n"));
} /* end else */
} /* end else */
@@ -7264,30 +7265,30 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx
static void
test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- attr_iter_info_t iter_info; /* Iterator info */
- hbool_t *visited = NULL; /* Array of flags for visiting links */
- hsize_t idx; /* Start index for iteration */
- unsigned use_index; /* Use index on creation order values */
- const char *dsetname; /* Name of dataset for attributes */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ attr_iter_info_t iter_info; /* Iterator info */
+ hbool_t *visited = NULL; /* Array of flags for visiting links */
+ hsize_t idx; /* Start index for iteration */
+ unsigned use_index; /* Use index on creation order values */
+ const char *dsetname; /* Name of dataset for attributes */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -7324,36 +7325,36 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
if (order == H5_ITER_INC) {
if (use_index)
MESSAGE(5, ("Testing Iterating over Attributes By Creation Order Index in "
- "Increasing Order w/Creation Order Index\n"))
+ "Increasing Order w/Creation Order Index\n"));
else
MESSAGE(5, ("Testing Iterating over Attributes By Creation Order Index in "
- "Increasing Order w/o Creation Order Index\n"))
+ "Increasing Order w/o Creation Order Index\n"));
} /* end if */
else {
if (use_index)
MESSAGE(5, ("Testing Iterating over Attributes By Creation Order Index in "
- "Decreasing Order w/Creation Order Index\n"))
+ "Decreasing Order w/Creation Order Index\n"));
else
MESSAGE(5, ("Testing Iterating over Attributes By Creation Order Index in "
- "Decreasing Order w/o Creation Order Index\n"))
+ "Decreasing Order w/o Creation Order Index\n"));
} /* end else */
} /* end if */
else {
if (order == H5_ITER_INC) {
if (use_index)
MESSAGE(5, ("Testing Iterating over Attributes By Name Index in Increasing Order "
- "w/Creation Order Index\n"))
+ "w/Creation Order Index\n"));
else
MESSAGE(5, ("Testing Iterating over Attributes By Name Index in Increasing Order "
- "w/o Creation Order Index\n"))
+ "w/o Creation Order Index\n"));
} /* end if */
else {
if (use_index)
MESSAGE(5, ("Testing Iterating over Attributes By Name Index in Decreasing Order "
- "w/Creation Order Index\n"))
+ "w/Creation Order Index\n"));
else
MESSAGE(5, ("Testing Iterating over Attributes By Name Index in Decreasing Order "
- "w/o Creation Order Index\n"))
+ "w/o Creation Order Index\n"));
} /* end else */
} /* end else */
@@ -7668,27 +7669,27 @@ attr_open_by_idx_check(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
static void
test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- H5_index_t idx_type; /* Type of index to operate on */
- H5_iter_order_t order; /* Order within in the index */
- unsigned use_index; /* Use index on creation order values */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- hid_t ret_id; /* Generic hid_t return value */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ H5_index_t idx_type; /* Type of index to operate on */
+ H5_iter_order_t order; /* Order within in the index */
+ unsigned use_index; /* Use index on creation order values */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ hid_t ret_id; /* Generic hid_t return value */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -7719,36 +7720,36 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
if (order == H5_ITER_INC) {
if (use_index)
MESSAGE(5, ("Testing Opening Attributes By Creation Order Index in Increasing "
- "Order w/Creation Order Index\n"))
+ "Order w/Creation Order Index\n"));
else
MESSAGE(5, ("Testing Opening Attributes By Creation Order Index in Increasing "
- "Order w/o Creation Order Index\n"))
+ "Order w/o Creation Order Index\n"));
} /* end if */
else {
if (use_index)
MESSAGE(5, ("Testing Opening Attributes By Creation Order Index in Decreasing "
- "Order w/Creation Order Index\n"))
+ "Order w/Creation Order Index\n"));
else
MESSAGE(5, ("Testing Opening Attributes By Creation Order Index in Decreasing "
- "Order w/o Creation Order Index\n"))
+ "Order w/o Creation Order Index\n"));
} /* end else */
} /* end if */
else {
if (order == H5_ITER_INC) {
if (use_index)
MESSAGE(5, ("Testing Opening Attributes By Name Index in Increasing Order "
- "w/Creation Order Index\n"))
+ "w/Creation Order Index\n"));
else
MESSAGE(5, ("Testing Opening Attributes By Name Index in Increasing Order w/o "
- "Creation Order Index\n"))
+ "Creation Order Index\n"));
} /* end if */
else {
if (use_index)
MESSAGE(5, ("Testing Opening Attributes By Name Index in Decreasing Order "
- "w/Creation Order Index\n"))
+ "w/Creation Order Index\n"));
else
MESSAGE(5, ("Testing Opening Attributes By Name Index in Decreasing Order w/o "
- "Creation Order Index\n"))
+ "Creation Order Index\n"));
} /* end else */
} /* end else */
@@ -8039,26 +8040,26 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id, unsigned max_attr
static void
test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- unsigned use_index; /* Use index on creation order values */
- const char *dsetname; /* Name of dataset for attributes */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- hid_t ret_id; /* Generic hid_t return value */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ unsigned use_index; /* Use index on creation order values */
+ const char *dsetname; /* Name of dataset for attributes */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ hid_t ret_id; /* Generic hid_t return value */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -8082,9 +8083,9 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
for (use_index = FALSE; use_index <= TRUE; use_index++) {
/* Print appropriate test message */
if (use_index)
- MESSAGE(5, ("Testing Opening Attributes By Name w/Creation Order Index\n"))
+ MESSAGE(5, ("Testing Opening Attributes By Name w/Creation Order Index\n"));
else
- MESSAGE(5, ("Testing Opening Attributes By Name w/o Creation Order Index\n"))
+ MESSAGE(5, ("Testing Opening Attributes By Name w/o Creation Order Index\n"));
/* Create file */
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
@@ -8335,25 +8336,25 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
static void
test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- unsigned max_compact; /* Maximum # of links to store in group compactly */
- unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- hsize_t nattrs; /* Number of attributes on object */
- hsize_t name_count; /* # of records in name index */
- hsize_t corder_count; /* # of records in creation order index */
- unsigned use_index; /* Use index on creation order values */
- const char *dsetname; /* Name of dataset for attributes */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- unsigned curr_dset; /* Current dataset to work on */
- unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset = H5I_INVALID_HID; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ unsigned max_compact; /* Maximum # of links to store in group compactly */
+ unsigned min_dense; /* Minimum # of links to store in group "densely" */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ hsize_t nattrs; /* Number of attributes on object */
+ hsize_t name_count; /* # of records in name index */
+ hsize_t corder_count; /* # of records in creation order index */
+ unsigned use_index; /* Use index on creation order values */
+ const char *dsetname; /* Name of dataset for attributes */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ unsigned curr_dset; /* Current dataset to work on */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -8377,9 +8378,9 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
for (use_index = FALSE; use_index <= TRUE; use_index++) {
/* Print appropriate test message */
if (use_index)
- MESSAGE(5, ("Testing Creating Attributes By Name w/Creation Order Index\n"))
+ MESSAGE(5, ("Testing Creating Attributes By Name w/Creation Order Index\n"));
else
- MESSAGE(5, ("Testing Creating Attributes By Name w/o Creation Order Index\n"))
+ MESSAGE(5, ("Testing Creating Attributes By Name w/o Creation Order Index\n"));
/* Create file */
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
@@ -11494,7 +11495,7 @@ test_attr(void)
test_attr_delete(my_fapl); /* Test H5A code for deleting attributes */
/* This next test uses its own file information */
- test_attr_dtype_shared(my_fapl); /* Test using shared dataypes in attributes */
+ test_attr_dtype_shared(my_fapl); /* Test using shared datatypes in attributes */
/* This next test uses its own file information */
test_attr_duplicate_ids(my_fapl);
diff --git a/test/tcheck_version.c b/test/tcheck_version.c
index 8b2dbd4..9e5e469 100644
--- a/test/tcheck_version.c
+++ b/test/tcheck_version.c
@@ -35,9 +35,9 @@ void parse(int ac, char **av);
void abort_intercept(int H5_ATTR_UNUSED sig);
/* global variables */
-unsigned major = H5_VERS_MAJOR;
-unsigned minor = H5_VERS_MINOR;
-unsigned release = H5_VERS_RELEASE;
+static unsigned major = H5_VERS_MAJOR;
+static unsigned minor = H5_VERS_MINOR;
+static unsigned release = H5_VERS_RELEASE;
void
showhelp(void)
diff --git a/test/tcoords.c b/test/tcoords.c
index bacff03..a06b103 100644
--- a/test/tcoords.c
+++ b/test/tcoords.c
@@ -33,7 +33,7 @@
/* Data written to the dataset for single block test. Global variable
* for convenience. */
-int da_buffer[2][3][6][2];
+static int da_buffer[2][3][6][2];
/***********************************************************
**
diff --git a/test/testframe.c b/test/testframe.c
index 5f8fbd4..ed60520 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -71,11 +71,11 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const
if (HDstrlen(TheDescr) >= MAXTESTDESC) {
printf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n", TheDescr, MAXTESTDESC);
exit(EXIT_FAILURE);
- } /* end if */
+ }
if (HDstrlen(TheName) >= MAXTESTNAME) {
printf("Test name too long, increase MAXTESTNAME(%d).\n", MAXTESTNAME);
exit(EXIT_FAILURE);
- } /* end if */
+ }
/* Check for increasing the Test array size */
if (Index >= TestAlloc) {
@@ -87,12 +87,12 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const
printf("Out of memory for tests, Index = %u, TestAlloc = %u, newAlloc = %u\n", Index, TestAlloc,
newAlloc);
exit(EXIT_FAILURE);
- } /* end if */
+ }
/* Update info */
Test = newTest;
TestAlloc = newAlloc;
- } /* end if */
+ }
/* Set up test function */
HDstrcpy(Test[Index].Description, TheDescr);
@@ -212,7 +212,7 @@ TestParseCmdLine(int argc, char *argv[])
hbool_t skipped_all = FALSE;
int ret_code;
- while (argv++, --argc > 0) {
+ while ((void)argv++, --argc > 0) {
if ((HDstrcmp(*argv, "-verbose") == 0) || (HDstrcmp(*argv, "-v") == 0)) {
if (argc > 0) {
--argc;
@@ -316,7 +316,7 @@ PerformTests(void)
}
Test_parameters = NULL; /* clear it. */
- MESSAGE(2, ("\n\n"))
+ MESSAGE(2, ("\n\n"));
if (num_errs)
print_func("!!! %d Error(s) were detected !!!\n\n", (int)num_errs);
@@ -634,7 +634,7 @@ TestAlarmOn(void)
/* Get the alarm value from the environment variable, if set */
if (env_val != NULL)
- alarm_sec = (unsigned)HDstrtoul(env_val, (char **)NULL, 10);
+ alarm_sec = (unsigned)strtoul(env_val, (char **)NULL, 10);
/* Set the number of seconds before alarm goes off */
alarm((unsigned)alarm_sec);
diff --git a/test/testhdf5.h b/test/testhdf5.h
index 4016fd4..1ebd619 100644
--- a/test/testhdf5.h
+++ b/test/testhdf5.h
@@ -38,7 +38,7 @@
} while (0)
#define CHECK_I(ret, where) \
- { \
+ do { \
if (VERBOSE_HI) { \
print_func(" Call to routine: %15s at line %4d in %s returned %ld\n", (where), (int)__LINE__, \
__FILE__, (long)(ret)); \
@@ -48,11 +48,11 @@
(int)__LINE__, __FILE__); \
H5Eprint2(H5E_DEFAULT, stdout); \
} \
- }
+ } while (0)
/* Check that a pointer is valid (i.e.: not NULL) */
#define CHECK_PTR(ret, where) \
- { \
+ do { \
if (VERBOSE_HI) { \
print_func(" Call to routine: %15s at line %4d in %s returned %p\n", (where), (int)__LINE__, \
__FILE__, ((const void *)ret)); \
@@ -62,11 +62,11 @@
__FILE__); \
H5Eprint2(H5E_DEFAULT, stdout); \
} \
- }
+ } while (0)
/* Check that a pointer is NULL */
#define CHECK_PTR_NULL(ret, where) \
- { \
+ do { \
if (VERBOSE_HI) { \
print_func(" Call to routine: %15s at line %4d in %s returned %p\n", (where), (int)__LINE__, \
__FILE__, ((const void *)ret)); \
@@ -76,11 +76,11 @@
(int)__LINE__, __FILE__); \
H5Eprint2(H5E_DEFAULT, stdout); \
} \
- }
+ } while (0)
/* Check that two pointers are equal */
#define CHECK_PTR_EQ(ret, val, where) \
- { \
+ do { \
if (VERBOSE_HI) { \
print_func(" Call to routine: %15s at line %4d in %s returned %p\n", (where), (int)__LINE__, \
__FILE__, (const void *)(ret)); \
@@ -91,7 +91,7 @@
(where), (const void *)(ret), (const void *)(val), (int)__LINE__, __FILE__); \
H5Eprint2(H5E_DEFAULT, stdout); \
} \
- }
+ } while (0)
/* Used to make certain a return value _is_ a value */
#define VERIFY(_x, _val, where) \
@@ -164,19 +164,19 @@
/* Used to document process through a test */
#if defined(H5_HAVE_PARALLEL) && defined(H5_PARALLEL_TEST)
#define MESSAGE(V, A) \
- { \
+ do { \
int mpi_rank; \
\
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); \
if (mpi_rank == 0 && HDGetTestVerbosity() > (V)) \
print_func A; \
- }
+ } while (0)
#else /* H5_HAVE_PARALLEL */
#define MESSAGE(V, A) \
- { \
+ do { \
if (HDGetTestVerbosity() > (V)) \
print_func A; \
- }
+ } while (0)
#endif /* H5_HAVE_PARALLEL */
/* Used to indicate an error that is complex to check for */
diff --git a/test/tfile.c b/test/tfile.c
index 303d8de..566a285 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -142,14 +142,14 @@
#define FILE8 "tfile8.h5" /* Test file */
/* Files created under 1.6 branch and 1.8 branch--used in test_filespace_compatible() */
-const char *OLD_FILENAME[] = {
+static const char *OLD_FILENAME[] = {
"filespace_1_6.h5", /* 1.6 HDF5 file */
"filespace_1_8.h5" /* 1.8 HDF5 file */
};
/* Files created in 1.10.0 release --used in test_filespace_1.10.0_compatible() */
/* These files are copied from release 1.10.0 tools/h5format_convert/testfiles */
-const char *OLD_1_10_0_FILENAME[] = {
+static const char *OLD_1_10_0_FILENAME[] = {
"h5fc_ext1_i.h5", /* 0 */
"h5fc_ext1_f.h5", /* 1 */
"h5fc_ext2_if.h5", /* 2 */
@@ -159,7 +159,7 @@ const char *OLD_1_10_0_FILENAME[] = {
};
/* Files used in test_filespace_round_compatible() */
-const char *FSPACE_FILENAMES[] = {
+static const char *FSPACE_FILENAMES[] = {
"fsm_aggr_nopersist.h5", /* H5F_FILE_SPACE_AGGR, not persisting free-space */
"fsm_aggr_persist.h5", /* H5F_FILE_SPACE_AGGR, persisting free-space */
"paged_nopersist.h5", /* H5F_FILE_SPACE_PAGE, not persisting free-space */
@@ -168,7 +168,7 @@ const char *FSPACE_FILENAMES[] = {
"none.h5" /* H5F_FILE_SPACE_NONE */
};
-const char *FILESPACE_NAME[] = {"tfilespace", NULL};
+static const char *FILESPACE_NAME[] = {"tfilespace", NULL};
/* Declarations for test_libver_bounds_copy(): */
/* SRC_FILE: source file created under 1.8 branch with latest format */
@@ -342,43 +342,43 @@ test_file_create(void)
{
ret = H5Pset_userblock(tmpl1, BAD_USERBLOCK_SIZE1);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_userblock");
H5E_BEGIN_TRY
{
ret = H5Pset_userblock(tmpl1, BAD_USERBLOCK_SIZE2);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_userblock");
H5E_BEGIN_TRY
{
ret = H5Pset_userblock(tmpl1, BAD_USERBLOCK_SIZE3);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_userblock");
H5E_BEGIN_TRY
{
ret = H5Pset_userblock(tmpl1, BAD_USERBLOCK_SIZE4);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_userblock");
H5E_BEGIN_TRY
{
ret = H5Pset_userblock(tmpl1, BAD_USERBLOCK_SIZE5);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_userblock");
H5E_BEGIN_TRY
{
ret = H5Pset_userblock(tmpl1, BAD_USERBLOCK_SIZE6);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_userblock");
H5E_BEGIN_TRY
{
ret = H5Pset_userblock(tmpl1, BAD_USERBLOCK_SIZE7);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_userblock");
/* Set the new file-creation parameters */
@@ -669,7 +669,7 @@ test_file_reopen(void)
/* Create a dataset in the file */
sid = H5Screate_simple(1, &dims, &dims);
- CHECK_I(sid, "H5Screate_simple")
+ CHECK_I(sid, "H5Screate_simple");
did = H5Dcreate2(fid, REOPEN_DSET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK_I(did, "H5Dcreate2");
@@ -1401,7 +1401,7 @@ test_get_file_id(void)
{
fid2 = H5Iget_file_id(plist);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(fid2, FAIL, "H5Iget_file_id");
/* Close objects */
@@ -1607,7 +1607,7 @@ test_file_perm(void)
{
dset = H5Dcreate2(filero, F2_DSET, H5T_NATIVE_INT, dspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(dset, FAIL, "H5Dcreate2");
if (dset != FAIL) {
ret = H5Dclose(dset);
@@ -1666,7 +1666,7 @@ test_file_perm2(void)
{
group = H5Gcreate2(filero, "MY_GROUP", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(group, FAIL, "H5Gcreate2");
/* Create a dataset with the read-only file handle (should fail) */
@@ -1674,7 +1674,7 @@ test_file_perm2(void)
{
dset = H5Dcreate2(filero, F2_DSET, H5T_NATIVE_INT, dspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(dset, FAIL, "H5Dcreate2");
/* Create an attribute with the read-only file handle (should fail) */
@@ -1682,7 +1682,7 @@ test_file_perm2(void)
{
attr = H5Acreate2(filero, "MY_ATTR", H5T_NATIVE_INT, dspace, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(attr, FAIL, "H5Acreate2");
type = H5Tcopy(H5T_NATIVE_SHORT);
@@ -1693,7 +1693,7 @@ test_file_perm2(void)
{
ret = H5Tcommit2(filero, "MY_DTYPE", type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Tcommit2");
ret = H5Tclose(type);
@@ -2045,7 +2045,7 @@ test_file_delete(hid_t fapl_id)
{
is_hdf5 = H5Fis_accessible(filename, fapl_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(is_hdf5, FAIL, "H5Fis_accessible");
/* Just in case deletion fails - silent on errors */
@@ -2076,7 +2076,7 @@ test_file_delete(hid_t fapl_id)
{
is_hdf5 = H5Fis_accessible(filename, fapl_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
CHECK(is_hdf5, TRUE, "H5Fis_accessible");
/* Try to delete it (should fail) */
@@ -2084,7 +2084,7 @@ test_file_delete(hid_t fapl_id)
{
ret = H5Fdelete(filename, fapl_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Fdelete");
/* Delete the file */
@@ -2130,7 +2130,7 @@ test_file_open_dot(void)
{
did = H5Dcreate2(fid, ".", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(did, FAIL, "H5Dcreate2");
/* Create a dataset with no name using the group ID */
@@ -2138,7 +2138,7 @@ test_file_open_dot(void)
{
did = H5Dcreate2(gid, ".", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(did, FAIL, "H5Dcreate2");
/* Open a dataset with no name using the file ID */
@@ -2146,7 +2146,7 @@ test_file_open_dot(void)
{
did = H5Dopen2(fid, ".", H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(did, FAIL, "H5Dopen2");
/* Open a dataset with no name using the group ID */
@@ -2154,7 +2154,7 @@ test_file_open_dot(void)
{
did = H5Dopen2(gid, ".", H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(did, FAIL, "H5Dopen2");
/* Make a copy of a datatype to use for creating a named datatype */
@@ -2166,7 +2166,7 @@ test_file_open_dot(void)
{
ret = H5Tcommit2(fid, ".", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Tcommit2");
/* Create a named datatype with no name using the group ID */
@@ -2174,7 +2174,7 @@ test_file_open_dot(void)
{
ret = H5Tcommit2(gid, ".", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Tcommit2");
/* Open a named datatype with no name using the file ID */
@@ -2182,7 +2182,7 @@ test_file_open_dot(void)
{
tid2 = H5Topen2(fid, ".", H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tid2, FAIL, "H5Topen2");
/* Open a named datatype with no name using the group ID */
@@ -2190,7 +2190,7 @@ test_file_open_dot(void)
{
tid2 = H5Topen2(gid, ".", H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tid2, FAIL, "H5Topen2");
/* Create a group with no name using the file ID */
@@ -2198,7 +2198,7 @@ test_file_open_dot(void)
{
gid2 = H5Gcreate2(fid, ".", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(gid2, FAIL, "H5Gcreate2");
/* Create a group with no name using the group ID */
@@ -2206,7 +2206,7 @@ test_file_open_dot(void)
{
gid2 = H5Gcreate2(gid, ".", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(gid2, FAIL, "H5Gcreate2");
/* Open a group with no name using the file ID (should open the root group) */
@@ -2389,7 +2389,7 @@ test_file_getname(void)
{
name_len = H5Fget_name(space_id, name, (size_t)TESTA_NAME_BUF_SIZE);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(name_len, FAIL, "H5Fget_name");
/* Create a new dataset */
@@ -3511,7 +3511,7 @@ test_userblock_alignment(const char *env_h5_drvr)
{
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(fid, FAIL, "H5Fcreate");
/* Release property lists */
@@ -3544,7 +3544,7 @@ test_userblock_alignment(const char *env_h5_drvr)
{
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(fid, FAIL, "H5Fcreate");
/* Release property lists */
@@ -3722,7 +3722,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
{
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(fid, FAIL, "H5Fcreate");
/* Release property lists */
@@ -3800,7 +3800,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
{
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(fid, FAIL, "H5Fcreate");
/* Release property lists */
@@ -3840,7 +3840,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
{
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(fid, FAIL, "H5Fcreate");
/* Release property lists */
@@ -3918,7 +3918,7 @@ test_userblock_alignment_paged(const char *env_h5_drvr)
{
fid = H5Fcreate(FILE1, H5F_ACC_TRUNC, fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(fid, FAIL, "H5Fcreate");
/* Release property lists */
@@ -4111,7 +4111,7 @@ test_filespace_info(const char *env_h5_drvr)
{
ret = H5Pset_file_space_page_size(fcpl, 0);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_file_space_page_size");
/* Setting to 511: should fail */
@@ -4119,7 +4119,7 @@ test_filespace_info(const char *env_h5_drvr)
{
ret = H5Pset_file_space_page_size(fcpl, 511);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_file_space_page_size");
/* Setting to 1GB+1: should fail */
@@ -4127,7 +4127,7 @@ test_filespace_info(const char *env_h5_drvr)
{
ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE1G + 1);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_file_space_page_size");
/* Setting to 512: should succeed */
@@ -5530,7 +5530,7 @@ test_libver_bounds_open(void)
{
file = H5Fopen(VERBFNAME, H5F_ACC_RDONLY, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(file, FAIL, "Attempted to open latest file with earliest version");
/* Attempt to open latest file with (v18, v18), should fail */
@@ -5539,7 +5539,7 @@ test_libver_bounds_open(void)
{
file = H5Fopen(VERBFNAME, H5F_ACC_RDONLY, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(file, FAIL, "Attempted to open latest file with v18 bounds");
/* Opening VERBFNAME in these combination should succeed.
@@ -5731,7 +5731,7 @@ test_libver_bounds_low_high(const char *env_h5_drvr)
/* Set the low/high version bounds */
ret = H5Pset_libver_bounds(fapl, low, high);
}
- H5E_END_TRY;
+ H5E_END_TRY
/* Should fail: invalid combinations */
if (high == H5F_LIBVER_EARLIEST) {
@@ -5946,7 +5946,7 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
{
fid = H5Fcreate(FILE8, H5F_ACC_TRUNC | (is_swmr ? H5F_ACC_SWMR_WRITE : 0), fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
/* Get the internal file pointer if the create succeeds */
if (fid >= 0) {
@@ -6113,7 +6113,7 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
{
fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, fcpl, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
/* Retrieve the low/high bounds */
ret = H5Pget_libver_bounds(fapl, &low, &high);
@@ -6147,7 +6147,7 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
{
ret = H5Pset_libver_bounds(new_fapl, low, high);
}
- H5E_END_TRY;
+ H5E_END_TRY
/* Invalid combinations */
if (ret < 0)
@@ -6158,7 +6158,7 @@ test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t non
{
fid = H5Fopen(FILE8, H5F_ACC_RDWR | (is_swmr ? H5F_ACC_SWMR_WRITE : 0), new_fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (non_def_fsm && high < H5F_LIBVER_V110) {
VERIFY(fid, H5I_INVALID_HID, "H5Fopen");
@@ -6330,7 +6330,7 @@ test_libver_bounds_obj(hid_t fapl)
{
ret = H5Pset_libver_bounds(new_fapl, low, high);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (ret < 0) /* Invalid combinations */
continue;
@@ -6340,7 +6340,7 @@ test_libver_bounds_obj(hid_t fapl)
{
fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (fid >= 0) { /* The file open succeeds */
@@ -6496,7 +6496,7 @@ test_libver_bounds_dataset(hid_t fapl)
{
did = H5Dcreate2(fid, DSETB, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (did >= 0) {
@@ -6548,7 +6548,7 @@ test_libver_bounds_dataset(hid_t fapl)
{
ret = H5Pset_libver_bounds(new_fapl, low, high);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (ret < 0) /* Invalid low/high combinations */
continue;
@@ -6558,7 +6558,7 @@ test_libver_bounds_dataset(hid_t fapl)
{
fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (fid >= 0) { /* The file open succeeds */
@@ -6777,7 +6777,7 @@ test_libver_bounds_dataspace(hid_t fapl)
{
ret = H5Pset_libver_bounds(new_fapl, low, high);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (ret < 0) /* Invalid low/high combinations */
continue;
@@ -6787,7 +6787,7 @@ test_libver_bounds_dataspace(hid_t fapl)
{
fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (fid >= 0) { /* The file open succeeds */
@@ -7113,7 +7113,7 @@ test_libver_bounds_datatype_check(hid_t fapl, hid_t tid)
{
ret = H5Pset_libver_bounds(new_fapl, low, high);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (ret < 0) /* Invalid low/high combinations */
continue;
@@ -7123,7 +7123,7 @@ test_libver_bounds_datatype_check(hid_t fapl, hid_t tid)
{
fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (fid >= 0) { /* The file open succeeds */
@@ -7441,7 +7441,7 @@ test_libver_bounds_attributes(hid_t fapl)
{
ret = H5Pset_libver_bounds(new_fapl, low, high);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (ret < 0) /* Invalid low/high combinations */
continue;
@@ -7451,7 +7451,7 @@ test_libver_bounds_attributes(hid_t fapl)
{
fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (fid >= 0) { /* The file open succeeds */
@@ -7608,7 +7608,7 @@ test_libver_macros2(void)
{
grp = H5Gopen(file, "Group");
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(grp, FAIL, "H5Gopen");
#endif
@@ -7847,7 +7847,7 @@ test_min_dset_ohdr(void)
{
ret = H5Fset_dset_no_attrs_hint(-1, TRUE);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Fset_dset_no_attrs_hint");
/* trying to get with invalid file ID */
@@ -7855,7 +7855,7 @@ test_min_dset_ohdr(void)
{
ret = H5Fget_dset_no_attrs_hint(-1, &minimize);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Fget_dset_no_attrs_hint");
/* trying to get with invalid pointer */
@@ -7863,7 +7863,7 @@ test_min_dset_ohdr(void)
{
ret = H5Fget_dset_no_attrs_hint(file_id, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Fget_dset_no_attrs_hint");
/************/
@@ -8226,5 +8226,5 @@ cleanup_file(void)
H5Fdelete(FILE7, H5P_DEFAULT);
H5Fdelete(DST_FILE, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
}
diff --git a/test/tgenprop.c b/test/tgenprop.c
index 5b249d4..c542603 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -39,22 +39,22 @@
/* Property definitions */
#define PROP1_NAME "Property 1"
-int prop1_def = 10; /* Property 1 default value */
+static int prop1_def = 10; /* Property 1 default value */
#define PROP1_SIZE sizeof(prop1_def)
#define PROP1_DEF_VALUE (&prop1_def)
#define PROP2_NAME "Property 2"
-float prop2_def = 3.14F; /* Property 2 default value */
+static float prop2_def = 3.14F; /* Property 2 default value */
#define PROP2_SIZE sizeof(prop2_def)
#define PROP2_DEF_VALUE (&prop2_def)
#define PROP3_NAME "Property 3"
-char prop3_def[10] = "Ten chars"; /* Property 3 default value */
+static char prop3_def[10] = "Ten chars"; /* Property 3 default value */
#define PROP3_SIZE sizeof(prop3_def)
#define PROP3_DEF_VALUE (&prop3_def)
#define PROP4_NAME "Property 4"
-double prop4_def = 1.41; /* Property 4 default value */
+static double prop4_def = 1.41; /* Property 4 default value */
#define PROP4_SIZE sizeof(prop4_def)
#define PROP4_DEF_VALUE (&prop4_def)
@@ -996,9 +996,9 @@ typedef struct {
} prop_cb_info;
/* Global variables for Callback information */
-prop_cb_info prop1_cb_info; /* Callback statistics for property #1 */
-prop_cb_info prop2_cb_info; /* Callback statistics for property #2 */
-prop_cb_info prop3_cb_info; /* Callback statistics for property #3 */
+static prop_cb_info prop1_cb_info; /* Callback statistics for property #1 */
+static prop_cb_info prop2_cb_info; /* Callback statistics for property #2 */
+static prop_cb_info prop3_cb_info; /* Callback statistics for property #3 */
/****************************************************************
**
diff --git a/test/th5_system.c b/test/th5_system.c
index 7d500bd..33728ca 100644
--- a/test/th5_system.c
+++ b/test/th5_system.c
@@ -44,7 +44,7 @@ test_h5_dirname(void)
{
ret = H5_dirname(NULL, &dirname);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5_dirname with NULL path");
H5Eclear2(H5E_DEFAULT);
@@ -55,7 +55,7 @@ test_h5_dirname(void)
{
ret = H5_dirname(path, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5_dirname with NULL dirname pointer");
H5Eclear2(H5E_DEFAULT);
@@ -248,7 +248,7 @@ test_h5_basename(void)
{
ret = H5_basename(NULL, &basename);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5_basename with NULL path");
H5Eclear2(H5E_DEFAULT);
@@ -259,7 +259,7 @@ test_h5_basename(void)
{
ret = H5_basename(path, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5_basename with NULL basename pointer");
H5Eclear2(H5E_DEFAULT);
@@ -513,7 +513,7 @@ test_h5_strndup(void)
{
str = H5_strndup(NULL, 20);
}
- H5E_END_TRY;
+ H5E_END_TRY
CHECK_PTR_NULL(str, "H5_strndup with NULL string pointer");
H5Eclear2(H5E_DEFAULT);
diff --git a/test/th5o.c b/test/th5o.c
index e22f5ba..9031b28 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -989,7 +989,7 @@ test_h5o_link(void)
{
ret = H5Pset_libver_bounds(fapl_id, low, high);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (ret < 0) /* Invalid low/high combinations */
continue;
@@ -1180,7 +1180,7 @@ test_h5o_comment(void)
{
ret = H5Oset_comment(dspace, "dataspace comment");
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Oset_comment");
/* Close the file */
@@ -1355,7 +1355,7 @@ test_h5o_comment_by_name(void)
{
ret = H5Oset_comment_by_name(dspace, ".", "dataspace comment", H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Oset_comment");
/* Close the file */
@@ -1869,5 +1869,5 @@ cleanup_h5o(void)
h5_fixname(TEST_FILENAME, H5P_DEFAULT, filename, sizeof filename);
H5Fdelete(filename, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
}
diff --git a/test/th5s.c b/test/th5s.c
index f2c72ca..87e0de9 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -74,18 +74,18 @@
/* Scalar dataset with simple datatype */
#define SPACE3_RANK 0
-unsigned space3_data = 65;
+static unsigned space3_data = 65;
/* Scalar dataset with compound datatype */
#define SPACE4_FIELDNAME1 "c1"
#define SPACE4_FIELDNAME2 "u"
#define SPACE4_FIELDNAME3 "f"
#define SPACE4_FIELDNAME4 "c2"
-size_t space4_field1_off = 0;
-size_t space4_field2_off = 0;
-size_t space4_field3_off = 0;
-size_t space4_field4_off = 0;
-struct space4_struct {
+static size_t space4_field1_off = 0;
+static size_t space4_field2_off = 0;
+static size_t space4_field3_off = 0;
+static size_t space4_field4_off = 0;
+static struct space4_struct {
char c1;
unsigned u;
float f;
@@ -184,7 +184,7 @@ test_h5s_basic(void)
{
sid1 = H5Screate_simple(H5S_MAX_RANK + 1, dims3, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(sid1, FAIL, "H5Screate_simple");
/*
@@ -400,7 +400,7 @@ test_h5s_null(void)
ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, NULL, count, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Sselect_hyperslab");
/* Check to be sure we can't set a point selection on a null dataspace */
@@ -411,7 +411,7 @@ test_h5s_null(void)
coord[0][0] = 0;
ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)1, (const hsize_t *)coord);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Sselect_elements");
/* Create first dataset */
@@ -745,7 +745,7 @@ test_h5s_zero_dim(void)
{
ret = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, sid1, H5P_DEFAULT, wdata);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Dwrite");
/* Change to "none" selection */
@@ -764,7 +764,7 @@ test_h5s_zero_dim(void)
{
ret = H5Dwrite(dset1, H5T_NATIVE_INT, H5S_ALL, sid1, H5P_DEFAULT, &val);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Dwrite");
/* Restore the selection to all */
@@ -864,7 +864,7 @@ test_h5s_zero_dim(void)
{
ret = H5Dset_extent(dset1, extend_dims);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Dset_extent");
ret = H5Pclose(plist_id);
@@ -1265,7 +1265,7 @@ test_h5s_encode(H5F_libver_t low, H5F_libver_t high)
{
ret_id = H5Sdecode(sbuf);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Sdecode");
/* Encode the simple dataspace in a buffer with the fapl setting */
@@ -1457,7 +1457,7 @@ test_h5s_encode1(void)
{
ret_id = H5Sdecode(sbuf);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret_id, FAIL, "H5Sdecode");
/* Encode the simple dataspace in a buffer */
diff --git a/test/tid.c b/test/tid.c
index c70ca5b..0cb16ab 100644
--- a/test/tid.c
+++ b/test/tid.c
@@ -872,7 +872,7 @@ typedef struct {
} future_obj_t;
/* Global (static) future ID object type */
-H5I_type_t future_obj_type_g = H5I_BADID;
+static H5I_type_t future_obj_type_g = H5I_BADID;
/* Callback to free the actual object for future object test */
static herr_t
diff --git a/test/titerate.c b/test/titerate.c
index 3ca8a74..7bb13b0 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -194,7 +194,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
CHECK(ret, FAIL, "H5Fclose");
/* Sort the dataset names */
- HDqsort(lnames, (size_t)(NDATASETS + 2), sizeof(char *), iter_strcmp);
+ qsort(lnames, (size_t)(NDATASETS + 2), sizeof(char *), iter_strcmp);
/* Iterate through the datasets in the root group in various ways */
file = H5Fopen(DATAFILE, H5F_ACC_RDONLY, fapl);
@@ -233,7 +233,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
(herr_t)H5Lget_name_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)(NDATASETS + 3),
dataset_name, (size_t)NAMELEN, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Lget_name_by_idx");
ret = H5Gclose(root_group);
@@ -264,7 +264,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
ret = (herr_t)H5Lget_name_by_idx(file, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)(NDATASETS + 3),
dataset_name, (size_t)NAMELEN, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Lget_name_by_idx");
/* Test invalid indices for starting iteration */
@@ -274,7 +274,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
{
ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Literate2");
/* Test skipping exactly as many entries as in the group */
@@ -283,7 +283,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
{
ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Literate2");
/* Test skipping more entries than are in the group */
@@ -292,7 +292,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
{
ret = H5Literate2(file, H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Literate2");
/* Test all objects in group, when callback always returns 0 */
@@ -473,7 +473,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
{
ret = H5Aiterate2(dataset, H5_INDEX_NAME, H5_ITER_INC, &idx, aiter_cb, &info);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aiterate2");
/* Test skipping more attributes than there are */
@@ -482,7 +482,7 @@ test_iter_attr(hid_t fapl, hbool_t new_format)
{
ret = H5Aiterate2(dataset, H5_INDEX_NAME, H5_ITER_INC, &idx, aiter_cb, &info);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aiterate2");
/* Test all attributes on dataset, when callback always returns 0 */
@@ -706,7 +706,7 @@ test_iter_group_large(hid_t fapl)
CHECK(ret, FAIL, "H5Tclose");
/* Need to sort the names in the root group, cause that's what the library does */
- HDqsort(names, (size_t)(ITER_NGROUPS + 2), sizeof(iter_info), iter_strcmp2);
+ qsort(names, (size_t)(ITER_NGROUPS + 2), sizeof(iter_info), iter_strcmp2);
/* Iterate through the file to see members of the root group */
curr_name = &names[0];
@@ -804,7 +804,7 @@ test_grp_memb_funcs(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
/* Sort the dataset names */
- HDqsort(dnames, (size_t)(NDATASETS + 2), sizeof(char *), iter_strcmp);
+ qsort(dnames, (size_t)(NDATASETS + 2), sizeof(char *), iter_strcmp);
/* Iterate through the datasets in the root group in various ways */
file = H5Fopen(DATAFILE, H5F_ACC_RDONLY, fapl);
@@ -857,11 +857,11 @@ test_grp_memb_funcs(hid_t fapl)
(herr_t)H5Lget_name_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)(NDATASETS + 3),
dataset_name, (size_t)NAMELEN, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Lget_name_by_idx");
/* Sort the dataset names */
- HDqsort(obj_names, (size_t)(NDATASETS + 2), sizeof(char *), iter_strcmp);
+ qsort(obj_names, (size_t)(NDATASETS + 2), sizeof(char *), iter_strcmp);
/* Compare object names */
for (i = 0; i < (int)ginfo.nlinks; i++) {
diff --git a/test/tmeta.c b/test/tmeta.c
index f27084c..68f77c8 100644
--- a/test/tmeta.c
+++ b/test/tmeta.c
@@ -26,7 +26,7 @@
#define TEST_INT32_VALUE (-981236)
#define TEST_UINT32_VALUE 3476589
-uint8_t compar_buffer[] = {
+static uint8_t compar_buffer[] = {
/* Little-endian encoded version of the 16-bit signed integer */
(uint8_t)((TEST_INT16_VALUE)&0xff),
(uint8_t)((TEST_INT16_VALUE >> 8) & 0xff),
@@ -45,7 +45,7 @@ uint8_t compar_buffer[] = {
(uint8_t)((TEST_UINT32_VALUE >> 24) & 0xff),
};
-uint8_t encode_buffer[sizeof(compar_buffer)];
+static uint8_t encode_buffer[sizeof(compar_buffer)];
/****************************************************************
**
diff --git a/test/tmisc.c b/test/tmisc.c
index f5f2e67..3033613 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -1924,7 +1924,7 @@ test_misc11(void)
{
ret = H5Pset_sym_k(fcpl, 32770, 0);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_sym_k");
ret = H5Pset_sym_k(fcpl, MISC11_SYM_IK, MISC11_SYM_LK);
@@ -1935,7 +1935,7 @@ test_misc11(void)
{
ret = H5Pset_istore_k(fcpl, 32770);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_istore_k");
ret = H5Pset_istore_k(fcpl, MISC11_ISTORE_IK);
@@ -2345,8 +2345,8 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
CHECK_PTR(new_fp, "fopen");
/* Write the user block to the new file */
- written = HDfwrite(user_block, (size_t)1, size, new_fp);
- VERIFY(written, size, "HDfwrite");
+ written = fwrite(user_block, (size_t)1, size, new_fp);
+ VERIFY(written, size, "fwrite");
/* Open the old file */
old_fp = fopen(old_name, "rb");
@@ -2357,19 +2357,19 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char
CHECK_PTR(copy_buf, "malloc");
/* Copy data from the old file to the new file */
- while ((read_in = HDfread(copy_buf, (size_t)1, (size_t)MISC13_COPY_BUF_SIZE, old_fp)) > 0) {
+ while ((read_in = fread(copy_buf, (size_t)1, (size_t)MISC13_COPY_BUF_SIZE, old_fp)) > 0) {
/* Write the data to the new file */
- written = HDfwrite(copy_buf, (size_t)1, read_in, new_fp);
- VERIFY(written, read_in, "HDfwrite");
+ written = fwrite(copy_buf, (size_t)1, read_in, new_fp);
+ VERIFY(written, read_in, "fwrite");
}
/* Close the old file */
- ret = HDfclose(old_fp);
- VERIFY(ret, 0, "HDfclose");
+ ret = fclose(old_fp);
+ VERIFY(ret, 0, "fclose");
/* Close the new file */
- ret = HDfclose(new_fp);
- VERIFY(ret, 0, "HDfclose");
+ ret = fclose(new_fp);
+ VERIFY(ret, 0, "fclose");
/* Free the copy buffer */
free(copy_buf);
@@ -3203,7 +3203,7 @@ test_misc19(void)
{
ret = H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Fclose");
/* Check H5I operations on property lists */
@@ -3237,7 +3237,7 @@ test_misc19(void)
{
ret = H5Pclose(plid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pclose");
/* Check H5I operations on property classes */
@@ -3271,7 +3271,7 @@ test_misc19(void)
{
ret = H5Pclose_class(pcid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Pclose_class");
/* Check H5I operations on datatypes */
@@ -3305,7 +3305,7 @@ test_misc19(void)
{
ret = H5Tclose(tid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Tclose");
/* Check H5I operations on dataspaces */
@@ -3339,7 +3339,7 @@ test_misc19(void)
{
ret = H5Sclose(sid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Sclose");
/* Check H5I operations on datasets */
@@ -3381,7 +3381,7 @@ test_misc19(void)
{
ret = H5Dclose(did);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Dclose");
/* Close the dataspace */
@@ -3435,7 +3435,7 @@ test_misc19(void)
{
ret = H5Aclose(aid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Aclose");
/* Close the root group */
@@ -3485,7 +3485,7 @@ test_misc19(void)
{
ret = H5Gclose(gid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Gclose");
/* Close the file */
@@ -3523,7 +3523,7 @@ test_misc19(void)
{
ret = H5Eunregister_class(ecid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Eunregister_class");
/* Check H5I operations on error messages */
@@ -3561,7 +3561,7 @@ test_misc19(void)
{
ret = H5Eclose_msg(emid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Eclose_msg");
/* Close the error class */
@@ -3599,7 +3599,7 @@ test_misc19(void)
{
ret = H5Eclose_stack(esid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Eclose_stack");
/* Check H5I operations on virtual file drivers */
@@ -3637,7 +3637,7 @@ test_misc19(void)
{
ret = H5FDunregister(vfdid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5FDunregister");
free(vfd_cls);
@@ -3677,7 +3677,7 @@ test_misc19(void)
{
ret = H5VLunregister_connector(volid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5VLunregister_connector");
free(vol_cls);
@@ -4127,7 +4127,7 @@ test_misc23(void)
{
tmp_id = H5Gcreate1(file_id, "/A/B00a/grp", (size_t)0);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Gcreate1");
/* Make sure that size_hint values that can't fit into a 32-bit
@@ -4139,7 +4139,7 @@ test_misc23(void)
{
tmp_id = H5Gcreate1(file_id, "/size_hint_too_large", SIZE_MAX);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Gcreate1");
}
@@ -4148,7 +4148,7 @@ test_misc23(void)
{
tmp_id = H5Gcreate1(file_id, "/largest_size_hint", UINT32_MAX);
}
- H5E_END_TRY;
+ H5E_END_TRY
CHECK(tmp_id, FAIL, "H5Gcreate1");
status = H5Gclose(tmp_id);
CHECK(status, FAIL, "H5Gclose");
@@ -4162,7 +4162,7 @@ test_misc23(void)
{
tmp_id = H5Dcreate1(file_id, "/A/B00c/dset", type_id, space_id, create_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Dcreate1");
tmp_id = H5Dcreate1(file_id, "/A/dset", type_id, space_id, create_id);
@@ -4497,84 +4497,84 @@ test_misc24(void)
{
tmp_id = H5Dopen2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Dopen2");
H5E_BEGIN_TRY
{
tmp_id = H5Dopen2(file_id, MISC24_GROUP_LINK, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Dopen2");
H5E_BEGIN_TRY
{
tmp_id = H5Topen2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Topen2");
H5E_BEGIN_TRY
{
tmp_id = H5Topen2(file_id, MISC24_GROUP_LINK, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Topen2");
H5E_BEGIN_TRY
{
tmp_id = H5Gopen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Gopen2");
H5E_BEGIN_TRY
{
tmp_id = H5Gopen2(file_id, MISC24_DATASET_LINK, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Gopen2");
H5E_BEGIN_TRY
{
tmp_id = H5Topen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Topen2");
H5E_BEGIN_TRY
{
tmp_id = H5Topen2(file_id, MISC24_DATASET_LINK, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Topen2");
H5E_BEGIN_TRY
{
tmp_id = H5Gopen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Gopen2");
H5E_BEGIN_TRY
{
tmp_id = H5Gopen2(file_id, MISC24_DATATYPE_LINK, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Gopen2");
H5E_BEGIN_TRY
{
tmp_id = H5Dopen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Dopen2");
H5E_BEGIN_TRY
{
tmp_id = H5Dopen2(file_id, MISC24_DATATYPE_LINK, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Dopen2");
/* Try again, with the object already open through valid call */
@@ -4586,28 +4586,28 @@ test_misc24(void)
{
tmp_id = H5Dopen2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Dopen2");
H5E_BEGIN_TRY
{
tmp_id = H5Dopen2(file_id, MISC24_GROUP_LINK, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Dopen2");
H5E_BEGIN_TRY
{
tmp_id = H5Topen2(file_id, MISC24_GROUP_NAME, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Topen2");
H5E_BEGIN_TRY
{
tmp_id = H5Topen2(file_id, MISC24_GROUP_LINK, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Topen2");
ret = H5Gclose(group_id);
@@ -4621,28 +4621,28 @@ test_misc24(void)
{
tmp_id = H5Gopen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Gopen2");
H5E_BEGIN_TRY
{
tmp_id = H5Gopen2(file_id, MISC24_DATASET_LINK, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Gopen2");
H5E_BEGIN_TRY
{
tmp_id = H5Topen2(file_id, MISC24_DATASET_NAME, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Topen2");
H5E_BEGIN_TRY
{
tmp_id = H5Topen2(file_id, MISC24_DATASET_LINK, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Topen2");
ret = H5Dclose(dset_id);
@@ -4656,28 +4656,28 @@ test_misc24(void)
{
tmp_id = H5Gopen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Gopen2");
H5E_BEGIN_TRY
{
tmp_id = H5Gopen2(file_id, MISC24_DATATYPE_LINK, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Gopen2");
H5E_BEGIN_TRY
{
tmp_id = H5Dopen2(file_id, MISC24_DATATYPE_NAME, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Dopen2");
H5E_BEGIN_TRY
{
tmp_id = H5Dopen2(file_id, MISC24_DATATYPE_LINK, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(tmp_id, FAIL, "H5Dopen2");
ret = H5Tclose(type_id);
@@ -4751,7 +4751,7 @@ test_misc25a(void)
sid = H5Screate(H5S_SCALAR);
CHECK(sid, FAIL, "H5Screate");
- /* Create dataype for attribute */
+ /* Create datatype for attribute */
tid = H5Tcopy(H5T_C_S1);
CHECK(tid, FAIL, "H5Tcopy");
ret = H5Tset_size(tid, (size_t)MISC25A_ATTR1_LEN);
@@ -4777,7 +4777,7 @@ test_misc25a(void)
sid = H5Screate(H5S_SCALAR);
CHECK(sid, FAIL, "H5Screate");
- /* Create dataype for attribute */
+ /* Create datatype for attribute */
tid = H5Tcopy(H5T_C_S1);
CHECK(tid, FAIL, "H5Tcopy");
ret = H5Tset_size(tid, (size_t)MISC25A_ATTR2_LEN);
@@ -4847,7 +4847,7 @@ test_misc25a(void)
sid = H5Screate(H5S_SCALAR);
CHECK(sid, FAIL, "H5Screate");
- /* Create dataype for attribute */
+ /* Create datatype for attribute */
tid = H5Tcopy(H5T_C_S1);
CHECK(tid, FAIL, "H5Tcopy");
ret = H5Tset_size(tid, (size_t)MISC25A_ATTR3_LEN);
@@ -4893,7 +4893,7 @@ test_misc25a(void)
sid = H5Screate(H5S_SCALAR);
CHECK(sid, FAIL, "H5Screate");
- /* Create dataype for attribute */
+ /* Create datatype for attribute */
tid = H5Tcopy(H5T_C_S1);
CHECK(tid, FAIL, "H5Tcopy");
ret = H5Tset_size(tid, (size_t)MISC25A_ATTR2_LEN);
@@ -4955,7 +4955,7 @@ test_misc25a(void)
sid = H5Screate(H5S_SCALAR);
CHECK(sid, FAIL, "H5Screate");
- /* Create dataype for attribute */
+ /* Create datatype for attribute */
tid = H5Tcopy(H5T_C_S1);
CHECK(tid, FAIL, "H5Tcopy");
ret = H5Tset_size(tid, (size_t)MISC25A_ATTR2_LEN);
@@ -5284,7 +5284,7 @@ test_misc27(void)
{
gid = H5Gopen2(fid, MISC27_GROUP, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(gid, FAIL, "H5Gopen2");
#else /* H5_STRICT_FORMAT_CHECKS */
/* Open group with incorrect # of object header messages */
@@ -5798,7 +5798,7 @@ test_misc33(void)
{
ret = H5Oget_info_by_name3(fid, "/soft_two", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Oget_info_by_name3");
/* Case (2) */
@@ -5806,7 +5806,7 @@ test_misc33(void)
{
ret = H5Oget_info_by_name3(fid, "/dsetA", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Oget_info_by_name3");
/* Case (3) */
@@ -5814,7 +5814,7 @@ test_misc33(void)
{
ret = H5Oget_info_by_name3(fid, "/soft_one", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Oget_info_by_name3");
/* Close the file */
diff --git a/test/trefer.c b/test/trefer.c
index 199436a..0aff270 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -1302,7 +1302,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
{
dset1 = H5Dcreate2(fid1, "Dataset1", H5T_STD_REF, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (dset1 < 0) {
VERIFY(libver_high <= H5F_LIBVER_V110, TRUE, "H5Dcreate2");
@@ -1465,7 +1465,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
{
dset2 = H5Ropen_object(&rdata_NA[0], H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(dset2, H5I_INVALID_HID, "H5Ropen_object");
/* Close and release resources. */
@@ -1478,7 +1478,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
{
ret = H5Dclose(dset2);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Dclose");
/*
@@ -1633,7 +1633,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
{
ret = H5Rget_obj_type3(&nvrbuf[j], H5P_DEFAULT, &obj_type);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Rget_obj_type3");
} /* end for */
@@ -1758,7 +1758,7 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
{
dset1 = H5Dcreate2(fid1, "Dataset1", H5T_STD_REF, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (dset1 < 0) {
diff --git a/test/trefer_deprec.c b/test/trefer_deprec.c
index 92f7482..f39e93c 100644
--- a/test/trefer_deprec.c
+++ b/test/trefer_deprec.c
@@ -465,7 +465,7 @@ test_reference_obj(void)
{
ret = H5Rget_obj_type2(dataset, H5R_OBJECT, &nvrbuf[j], &obj_type);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Rget_obj_type2");
} /* end for */
@@ -665,7 +665,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
{
ret = H5Rcreate(&wbuf[2], fid1, "/Dataset2", H5R_DATASET_REGION, sid2);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (libver_high < H5F_LIBVER_V110)
VERIFY(ret, FAIL, "H5Rcreate");
@@ -743,7 +743,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
{
dset2 = H5Rdereference2(dset_NA, H5P_DEFAULT, H5R_DATASET_REGION, &rdata_NA[0]);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(dset2, FAIL, "H5Rdereference2");
/* Close and release resources. */
@@ -756,7 +756,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
{
ret = H5Dclose(dset2);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Dclose");
/*
@@ -913,7 +913,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
{
ret = H5Rget_obj_type2(dset1, H5R_DATASET_REGION, &nvrbuf[j], &obj_type);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Rget_obj_type2");
} /* end for */
diff --git a/test/tselect.c b/test/tselect.c
index f57735f..879f4f7 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -290,7 +290,7 @@ test_select_hyper(hid_t xfer_plist)
{
ret = H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, stride, count, block);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Sselect_hyperslab");
/* Test selecting stride<block to verify failure */
@@ -310,7 +310,7 @@ test_select_hyper(hid_t xfer_plist)
{
ret = H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, stride, count, block);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Sselect_hyperslab");
/* Select 2x15x13 hyperslab for disk dataset */
@@ -353,13 +353,13 @@ test_select_hyper(hid_t xfer_plist)
{
ret = H5Dwrite(dataset, H5T_NATIVE_UCHAR, sid2, sid1, xfer_plist, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Dwrite");
H5E_BEGIN_TRY
{
ret = H5Dwrite(dataset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, xfer_plist, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Dwrite");
/* Close memory dataspace */
@@ -403,13 +403,13 @@ test_select_hyper(hid_t xfer_plist)
{
ret = H5Dread(dataset, H5T_NATIVE_UCHAR, sid2, sid1, xfer_plist, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Dread");
H5E_BEGIN_TRY
{
ret = H5Dread(dataset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, xfer_plist, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Dread");
/* Check that the values match with a dataset iterator */
@@ -1382,8 +1382,8 @@ test_select_hyper_stride(hid_t xfer_plist)
CHECK(ret, FAIL, "H5Dread");
/* Sort the locations into the proper order */
- HDqsort(loc1, (size_t)72, sizeof(size_t), compare_size_t);
- HDqsort(loc2, (size_t)72, sizeof(size_t), compare_size_t);
+ qsort(loc1, (size_t)72, sizeof(size_t), compare_size_t);
+ qsort(loc2, (size_t)72, sizeof(size_t), compare_size_t);
/* Compare data read with data written out */
for (i = 0; i < 72; i++) {
tbuf = wbuf + loc1[i];
@@ -8235,7 +8235,7 @@ test_scalar_select2(void)
{
ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)1, (const hsize_t *)&coord1);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Sselect_elements");
/* Select one element in memory with a hyperslab selection */
@@ -8245,7 +8245,7 @@ test_scalar_select2(void)
{
ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, NULL, count, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Sselect_hyperslab");
/* Select no elements in memory & file with "none" selection */
@@ -13914,7 +13914,7 @@ test_select_bounds(void)
{
ret = H5Sget_select_bounds(sid, low_bounds, high_bounds);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Sget_select_bounds");
/* Set point selection */
@@ -13948,7 +13948,7 @@ test_select_bounds(void)
{
ret = H5Sget_select_bounds(sid, low_bounds, high_bounds);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Sget_select_bounds");
/* Set valid offset for selection */
@@ -14002,7 +14002,7 @@ test_select_bounds(void)
{
ret = H5Sget_select_bounds(sid, low_bounds, high_bounds);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Sget_select_bounds");
/* Set valid offset for selection */
@@ -14056,7 +14056,7 @@ test_select_bounds(void)
{
ret = H5Sget_select_bounds(sid, low_bounds, high_bounds);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Sget_select_bounds");
/* Set valid offset for selection */
@@ -14121,7 +14121,7 @@ test_hyper_regular(void)
{
is_regular = H5Sis_regular_hyperslab(sid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(is_regular, FAIL, "H5Sis_regular_hyperslab");
/* Query regular hyperslab selection info (should fail) */
@@ -14129,7 +14129,7 @@ test_hyper_regular(void)
{
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Sget_regular_hyperslab");
/* Set 'none' selection */
@@ -14141,7 +14141,7 @@ test_hyper_regular(void)
{
is_regular = H5Sis_regular_hyperslab(sid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(is_regular, FAIL, "H5Sis_regular_hyperslab");
/* Query regular hyperslab selection info (should fail) */
@@ -14149,7 +14149,7 @@ test_hyper_regular(void)
{
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Sget_regular_hyperslab");
/* Set point selection */
@@ -14173,7 +14173,7 @@ test_hyper_regular(void)
{
is_regular = H5Sis_regular_hyperslab(sid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(is_regular, FAIL, "H5Sis_regular_hyperslab");
/* Query regular hyperslab selection info (should fail) */
@@ -14181,7 +14181,7 @@ test_hyper_regular(void)
{
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Sget_regular_hyperslab");
/* Set "regular" hyperslab selection */
@@ -14239,7 +14239,7 @@ test_hyper_regular(void)
{
ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Sget_regular_hyperslab");
/* 'XOR' in the point again, to remove it, which should make it regular again */
@@ -15162,19 +15162,19 @@ test_sel_iter(void)
{ /* Bad dataspace ID */
iter_id = H5Ssel_iter_create(H5I_INVALID_HID, (size_t)1, (unsigned)0);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(iter_id, FAIL, "H5Ssel_iter_create");
H5E_BEGIN_TRY
{ /* Bad element size */
iter_id = H5Ssel_iter_create(sid, (size_t)0, (unsigned)0);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(iter_id, FAIL, "H5Ssel_iter_create");
H5E_BEGIN_TRY
{ /* Bad flag(s) */
iter_id = H5Ssel_iter_create(sid, (size_t)1, (unsigned)0xffff);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(iter_id, FAIL, "H5Ssel_iter_create");
/* Try closing selection iterator, with bad parameters */
@@ -15182,13 +15182,13 @@ test_sel_iter(void)
{ /* Invalid ID */
ret = H5Ssel_iter_close(H5I_INVALID_HID);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Ssel_iter_close");
H5E_BEGIN_TRY
{ /* Not a selection iterator ID */
ret = H5Ssel_iter_close(sid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Ssel_iter_close");
/* Try with no selection sharing, and with sharing */
@@ -15212,7 +15212,7 @@ test_sel_iter(void)
{ /* Invalid ID */
ret = H5Ssel_iter_close(iter_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Ssel_iter_close");
/* Create selection iterator object */
@@ -15224,13 +15224,13 @@ test_sel_iter(void)
{
ret = H5Ssel_iter_reset(H5I_INVALID_HID, sid);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Ssel_iter_reset");
H5E_BEGIN_TRY
{
ret = H5Ssel_iter_reset(iter_id, H5I_INVALID_HID);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Ssel_iter_reset");
/* Try retrieving sequences, with bad parameters */
@@ -15238,31 +15238,31 @@ test_sel_iter(void)
{ /* Invalid ID */
ret = H5Ssel_iter_get_seq_list(H5I_INVALID_HID, (size_t)1, (size_t)1, &nseq, &nbytes, off, len);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Ssel_iter_get_seq_list");
H5E_BEGIN_TRY
{ /* Invalid nseq pointer */
ret = H5Ssel_iter_get_seq_list(iter_id, (size_t)1, (size_t)1, NULL, &nbytes, off, len);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Ssel_iter_get_seq_list");
H5E_BEGIN_TRY
{ /* Invalid nbytes pointer */
ret = H5Ssel_iter_get_seq_list(iter_id, (size_t)1, (size_t)1, &nseq, NULL, off, len);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Ssel_iter_get_seq_list");
H5E_BEGIN_TRY
{ /* Invalid offset array */
ret = H5Ssel_iter_get_seq_list(iter_id, (size_t)1, (size_t)1, &nseq, &nbytes, NULL, len);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Ssel_iter_get_seq_list");
H5E_BEGIN_TRY
{ /* Invalid length array */
ret = H5Ssel_iter_get_seq_list(iter_id, (size_t)1, (size_t)1, &nseq, &nbytes, off, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(ret, FAIL, "H5Ssel_iter_get_seq_list");
/* Close selection iterator */
@@ -15686,31 +15686,31 @@ test_select_intersect_block(void)
{ /* Bad dataspace ID */
status = H5Sselect_intersect_block(H5I_INVALID_HID, block_start, block_end);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(status, FAIL, "H5Sselect_intersect_block");
H5E_BEGIN_TRY
{ /* Bad start pointer */
status = H5Sselect_intersect_block(sid, NULL, block_end);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(status, FAIL, "H5Sselect_intersect_block");
H5E_BEGIN_TRY
{ /* Bad end pointer */
status = H5Sselect_intersect_block(sid, block_start, NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(status, FAIL, "H5Sselect_intersect_block");
H5E_BEGIN_TRY
{ /* Invalid block */
status = H5Sselect_intersect_block(sid, block_start, block_end2);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(status, FAIL, "H5Sselect_intersect_block");
H5E_BEGIN_TRY
{ /* Another invalid block */
status = H5Sselect_intersect_block(sid, block_start, block_end3);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(status, FAIL, "H5Sselect_intersect_block");
/* Set selection to 'none' */
diff --git a/test/tsohm.c b/test/tsohm.c
index 6d6946d..fd931a0 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -26,20 +26,21 @@
/* Default SOHM values */
#define DEF_NUM_INDEXES 0
-const unsigned def_type_flags[H5O_SHMESG_MAX_NINDEXES] = {0, 0, 0, 0, 0, 0};
-const unsigned def_minsizes[H5O_SHMESG_MAX_NINDEXES] = {250, 250, 250, 250, 250, 250};
+static const unsigned def_type_flags[H5O_SHMESG_MAX_NINDEXES] = {0, 0, 0, 0, 0, 0};
+static const unsigned def_minsizes[H5O_SHMESG_MAX_NINDEXES] = {250, 250, 250, 250, 250, 250};
#define DEF_L2B 50
#define DEF_B2L 40
/* Non-default SOHM values for testing */
#define TEST_NUM_INDEXES 4
-const unsigned test_type_flags[H5O_SHMESG_MAX_NINDEXES] = {H5O_SHMESG_FILL_FLAG,
- H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_ATTR_FLAG,
- H5O_SHMESG_SDSPACE_FLAG,
- H5O_SHMESG_PLINE_FLAG,
- 0,
- 0};
-const unsigned test_minsizes[H5O_SHMESG_MAX_NINDEXES] = {0, 2, 40, 100, 3, 1000};
+static const unsigned test_type_flags[H5O_SHMESG_MAX_NINDEXES] = {H5O_SHMESG_FILL_FLAG,
+ H5O_SHMESG_DTYPE_FLAG |
+ H5O_SHMESG_ATTR_FLAG,
+ H5O_SHMESG_SDSPACE_FLAG,
+ H5O_SHMESG_PLINE_FLAG,
+ 0,
+ 0};
+static const unsigned test_minsizes[H5O_SHMESG_MAX_NINDEXES] = {0, 2, 40, 100, 3, 1000};
#define TEST_L2B 65
#define TEST_B2L 64
@@ -69,31 +70,31 @@ typedef struct dtype1_struct {
} dtype1_struct;
#define DTYPE2_SIZE 1024
-const char *DSETNAME[] = {"dataset0", "dataset1", "dataset2", "dataset3", "dataset4",
- "dataset5", "dataset6", "dataset7", "dataset8", "dataset9",
- "dataset10", "dataset11", NULL};
-const char *EXTRA_DSETNAME[] = {"ex_dataset0", "ex_dataset1", "ex_dataset2",
- "ex_dataset3", "ex_dataset4", "ex_dataset5",
- "ex_dataset6", "ex_dataset7", "ex_dataset8",
- "ex_dataset9", "ex_dataset10", "ex_dataset11",
- "ex_dataset12", "ex_dataset13", "ex_dataset14",
- "ex_dataset15", "ex_dataset16", "ex_dataset17",
- "ex_dataset18", "ex_dataset19", NULL};
+static const char *DSETNAME[] = {"dataset0", "dataset1", "dataset2", "dataset3", "dataset4",
+ "dataset5", "dataset6", "dataset7", "dataset8", "dataset9",
+ "dataset10", "dataset11", NULL};
+static const char *EXTRA_DSETNAME[] = {"ex_dataset0", "ex_dataset1", "ex_dataset2",
+ "ex_dataset3", "ex_dataset4", "ex_dataset5",
+ "ex_dataset6", "ex_dataset7", "ex_dataset8",
+ "ex_dataset9", "ex_dataset10", "ex_dataset11",
+ "ex_dataset12", "ex_dataset13", "ex_dataset14",
+ "ex_dataset15", "ex_dataset16", "ex_dataset17",
+ "ex_dataset18", "ex_dataset19", NULL};
#define SOHM_HELPER_NUM_EX_DSETS 20
typedef struct complex_t {
double re;
double im;
} complex_t;
#define ENUM_NUM_MEMBS 20
-const char *ENUM_NAME[] = {"enum_member0", "enum_member1", "enum_member2",
- "enum_member3", "enum_member4", "enum_member5",
- "enum_member6", "enum_member7", "enum_member8",
- "enum_member9", "enum_member10", "enum_member11",
- "enum_member12", "enum_member13", "enum_member14",
- "enum_member15", "enum_member16", "enum_member17",
- "enum_member18", "enum_member19", NULL};
-const int ENUM_VAL[] = {0, 13, -500, 63, 64, -64, 65, 2048, 1, 2, -1,
- 7, 130, -5000, 630, 640, -640, 650, 20480, 10, -1001, -10};
+static const char *ENUM_NAME[] = {"enum_member0", "enum_member1", "enum_member2",
+ "enum_member3", "enum_member4", "enum_member5",
+ "enum_member6", "enum_member7", "enum_member8",
+ "enum_member9", "enum_member10", "enum_member11",
+ "enum_member12", "enum_member13", "enum_member14",
+ "enum_member15", "enum_member16", "enum_member17",
+ "enum_member18", "enum_member19", NULL};
+static const int ENUM_VAL[] = {0, 13, -500, 63, 64, -64, 65, 2048, 1, 2, -1,
+ 7, 130, -5000, 630, 640, -640, 650, 20480, 10, -1001, -10};
#define SIZE2_RANK1 6
#define SIZE2_RANK2 10
#define SIZE2_DIMS \
@@ -1316,7 +1317,7 @@ test_sohm_attrs(void)
ret = H5Pclose(fcpl_id);
CHECK_I(ret, "H5Pclose");
}
- H5E_END_TRY;
+ H5E_END_TRY
/* three shared message indices
*/
@@ -2110,9 +2111,9 @@ test_sohm_size2(int close_reopen)
herr_t ret;
if (close_reopen == 0)
- MESSAGE(5, ("Testing that shared object header messages save space\n"))
+ MESSAGE(5, ("Testing that shared object header messages save space\n"));
else
- MESSAGE(5, ("Testing that shared messages save space when file is closed and reopened\n"))
+ MESSAGE(5, ("Testing that shared messages save space when file is closed and reopened\n"));
/* Create an fcpl with SOHMs disabled */
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
@@ -3265,7 +3266,7 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen)
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
#define TSOHM_VDE_VERIFY_SPACES(dims) \
- { \
+ do { \
/* Open dataspaces \
*/ \
space1_id = H5Dget_space(dset1_id); \
@@ -3299,7 +3300,7 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen)
CHECK_I(H5Sclose(space1_id), "H5Sclose"); \
CHECK_I(H5Sclose(space2_id), "H5Sclose"); \
CHECK_I(H5Sclose(space3_id), "H5Sclose"); \
- } /* define TSOHM_VDE_VERIFY_SPACES */
+ } while (0) /* define TSOHM_VDE_VERIFY_SPACES */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Macro: TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS()
@@ -3314,7 +3315,7 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen)
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
#define TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS(n) \
- { \
+ do { \
CHECK_I(H5Dclose(dset1_id), "H5Dclose"); \
if ((n) > 1) \
CHECK_I(H5Dclose(dset2_id), "H5Dclose"); \
@@ -3334,7 +3335,7 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen)
dset3_id = H5Dopen2(file_id, "dataset3", H5P_DEFAULT); \
CHECK_I(dset3_id, "H5Dopen2"); \
} \
- } /* define TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS */
+ } while (0) /* define TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS */
/* Remember the current # of reported errors */
old_nerrs = GetTestNumErrs();
diff --git a/test/tvltypes.c b/test/tvltypes.c
index 8da277b..2bc747c 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -139,7 +139,7 @@ test_vltypes_dataset_create(void)
{
dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, dcpl, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(dataset, FAIL, "H5Dcreate2");
/* Close datatype */
@@ -208,14 +208,14 @@ test_vltypes_funcs(void)
{
cset = H5Tget_cset(type);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(cset, FAIL, "H5Tget_cset");
H5E_BEGIN_TRY
{
strpad = H5Tget_strpad(type);
}
- H5E_END_TRY;
+ H5E_END_TRY
VERIFY(strpad, FAIL, "H5Tget_strpad");
/* Close datatype */
diff --git a/test/twriteorder.c b/test/twriteorder.c
index a6d2a45..c542161 100644
--- a/test/twriteorder.c
+++ b/test/twriteorder.c
@@ -378,7 +378,7 @@ main(int argc, char *argv[])
if (launch_g == UC_READWRITE) {
/* fork process */
- if ((childpid = HDfork()) < 0) {
+ if ((childpid = fork()) < 0) {
HDperror("fork");
Hgoto_error(1);
};
@@ -416,7 +416,7 @@ main(int argc, char *argv[])
/* If readwrite, collect exit code of child process */
/* ================================================ */
if (launch_g == UC_READWRITE) {
- if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0) {
+ if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
HDperror("waitpid");
Hgoto_error(1);
}