summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5C.c2
-rw-r--r--src/H5FDcore.c13
-rw-r--r--src/H5FDdirect.c10
-rw-r--r--src/H5FDfamily.c10
-rw-r--r--src/H5FDlog.c13
-rw-r--r--src/H5FDmpio.c10
-rw-r--r--src/H5FDsec2.c13
-rw-r--r--src/H5P.c4
-rw-r--r--src/H5S.c2
-rw-r--r--test/dtypes.c16
-rw-r--r--test/links.c4
-rw-r--r--test/tattr.c82
-rw-r--r--test/th5s.c5
-rw-r--r--test/trefer.c13
-rw-r--r--tools/h5repack/h5repack.c2
-rw-r--r--tools/h5repack/h5repack_copy.c2
-rw-r--r--tools/lib/h5tools_dump.c8
17 files changed, 126 insertions, 83 deletions
diff --git a/src/H5C.c b/src/H5C.c
index 56422e5..a28364a 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -9840,7 +9840,7 @@ H5C_tag_entry(H5C_t * cache_ptr, H5C_cache_entry_t * entry_ptr, hid_t dxpl_id)
{
H5P_genplist_t *dxpl; /* dataset transfer property list */
haddr_t tag; /* Tag address */
- hid_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index d1d4337..7d643d7 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -433,17 +433,22 @@ done:
*
* Purpose: Initializes any interface-specific data or routines.
*
- * Return: Success: The driver ID for the core driver.
- * Failure: Negative.
+ * Return: Non-negative on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_core_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ herr_t ret_value = SUCCEED;
- FUNC_LEAVE_NOAPI(H5FD_core_init())
+ FUNC_ENTER_NOAPI_NOINIT
+
+ if(H5FD_core_init() < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize core VFD")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD_core_init_interface() */
diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c
index 079554d..0c68315 100644
--- a/src/H5FDdirect.c
+++ b/src/H5FDdirect.c
@@ -200,9 +200,15 @@ DESCRIPTION
static herr_t
H5FD_direct_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
- FUNC_LEAVE_NOAPI(H5FD_direct_init())
+ if(H5FD_direct_init() < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize direct VFD")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD_direct_init_interface() */
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index 75c75ad..1728d13 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -161,9 +161,15 @@ DESCRIPTION
static herr_t
H5FD_family_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
- FUNC_LEAVE_NOAPI(H5FD_family_init())
+ if(H5FD_family_init() < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize family VFD")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD_family_init_interface() */
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index fdc2c92..b35dcf3 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -229,17 +229,22 @@ H5FL_DEFINE_STATIC(H5FD_log_t);
*
* Purpose: Initializes any interface-specific data or routines.
*
- * Return: Success: The driver ID for the log driver.
- * Failure: Negative.
+ * Return: Non-negative on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_log_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ if(H5FD_log_init() < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize log VFD")
- FUNC_LEAVE_NOAPI(H5FD_log_init())
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD_log_init_interface() */
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 8162ccd..1a768c2 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -180,9 +180,15 @@ DESCRIPTION
static herr_t
H5FD_mpio_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
- FUNC_LEAVE_NOAPI(H5FD_mpio_init())
+ if(H5FD_mpio_init() < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize mpio VFD")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD_mpio_init_interface() */
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index ca5127e..4f7c3d8 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -187,17 +187,22 @@ H5FL_DEFINE_STATIC(H5FD_sec2_t);
*
* Purpose: Initializes any interface-specific data or routines.
*
- * Return: Success: The driver ID for the sec2 driver.
- * Failure: Negative
+ * Return: Non-negative on success/Negative on failure
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_sec2_init_interface(void)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_NOAPI_NOINIT
+
+ if(H5FD_sec2_init() < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize sec2 VFD")
- FUNC_LEAVE_NOAPI(H5FD_sec2_init())
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD_sec2_init_interface() */
diff --git a/src/H5P.c b/src/H5P.c
index e561385..113203d 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -886,7 +886,7 @@ herr_t
H5Pencode(hid_t plist_id, void *buf, size_t *nalloc)
{
H5P_genplist_t *plist; /* Property list to query */
- hid_t ret_value = SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*x*z", plist_id, buf, nalloc);
@@ -1684,7 +1684,7 @@ done:
herr_t
H5Pclose_class(hid_t cls_id)
{
- hid_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", cls_id);
diff --git a/src/H5S.c b/src/H5S.c
index 1d5436c..eb5430e 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -467,7 +467,7 @@ H5Sextent_copy(hid_t dst_id,hid_t src_id)
{
H5S_t *src;
H5S_t *dst;
- hid_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ii", dst_id, src_id);
diff --git a/test/dtypes.c b/test/dtypes.c
index 65f5f8c..b2783c3 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -65,8 +65,8 @@
FAIL_STACK_ERROR \
if((NMEMBS) != H5I_nmembers(H5I_DATATYPE)) { \
H5_FAILED(); \
- printf(" #dtype ids expected: %lld; found: %"PRId64"\n", (long long)NMEMBS, \
- H5I_nmembers(H5I_DATATYPE)); \
+ printf(" #dtype ids expected: %lld; found: %lld\n", \
+ (long long)NMEMBS, (long long)H5I_nmembers(H5I_DATATYPE)); \
goto error; \
}
@@ -3008,7 +3008,7 @@ test_compound_16(void)
if(H5Fget_obj_ids(file, H5F_OBJ_DATATYPE, (size_t)2, open_dtypes) < 0) TEST_ERROR
if(open_dtypes[1]) {
H5_FAILED(); AT();
- printf(" H5Fget_obj_ids returned as second id: %"PRId64"; expected: 0\n", open_dtypes[1]);
+ printf(" H5Fget_obj_ids returned as second id: %lld; expected: 0\n", (long long)open_dtypes[1]);
goto error;
}
@@ -3549,6 +3549,7 @@ test_transient (hid_t fapl)
static hsize_t ds_size[2] = {10, 20};
hid_t file=-1, type=-1, space=-1, dset=-1, t2=-1;
char filename[1024];
+ hid_t ret_id; /* Generic hid_t return value */
herr_t status;
TESTING("transient datatypes");
@@ -3583,9 +3584,9 @@ test_transient (hid_t fapl)
/* It should not be possible to create an attribute for a transient type */
H5E_BEGIN_TRY {
- status = H5Acreate2(type, "attr1", H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT);
+ ret_id = H5Acreate2(type, "attr1", H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY;
- if (status>=0) {
+ if (ret_id>=0) {
H5_FAILED();
HDputs (" Attributes should not be allowed for transient types!");
goto error;
@@ -5147,6 +5148,7 @@ test_encode(void)
size_t enum_buf_size = 0;
size_t vlstr_buf_size = 0;
unsigned char *cmpd_buf=NULL, *enum_buf=NULL, *vlstr_buf=NULL;
+ hid_t ret_id;
herr_t ret;
TESTING("functions of encoding and decoding datatypes");
@@ -5247,9 +5249,9 @@ test_encode(void)
/* Try decoding bogus buffer */
H5E_BEGIN_TRY {
- ret = H5Tdecode(cmpd_buf);
+ ret_id = H5Tdecode(cmpd_buf);
} H5E_END_TRY;
- if(ret!=FAIL) {
+ if(ret_id!=FAIL) {
H5_FAILED();
printf("Decoded bogus buffer!\n");
goto error;
diff --git a/test/links.c b/test/links.c
index 09c2d4d..00d8d04 100644
--- a/test/links.c
+++ b/test/links.c
@@ -12878,7 +12878,7 @@ open_by_idx(hid_t fapl)
char valname[NAME_BUF_SIZE]; /* Link value */
haddr_t *objno = NULL; /* Addresses of the objects created */
unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t ret; /* Generic return value */
/* Create group creation property list */
if((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) TEST_ERROR
@@ -13103,7 +13103,7 @@ open_by_idx_old(hid_t fapl)
char valname[NAME_BUF_SIZE]; /* Link value */
haddr_t objno[CORDER_NLINKS]; /* Addresses of the objects created */
unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ hid_t ret; /* Generic return value */
/* Create file to mount */
h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
diff --git a/test/tattr.c b/test/tattr.c
index 57b3263..2885124 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -178,6 +178,7 @@ test_attr_basic_write(hid_t fapl)
hsize_t dims3[] = {ATTR2_DIM1,ATTR2_DIM2};
int read_data1[ATTR1_DIM1]={0}; /* Buffer for reading 1st attribute */
int i;
+ hid_t ret_id; /* Generic hid_t return value */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -228,8 +229,8 @@ test_attr_basic_write(hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Acreate2");
+ ret_id = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Acreate2");
/* Write attribute information */
ret = H5Awrite(attr, H5T_NATIVE_INT, attr_data1);
@@ -366,8 +367,8 @@ test_attr_basic_write(hid_t fapl)
VERIFY(attr_size, (ATTR2_DIM1 * ATTR2_DIM2 * sizeof(int)), "H5Aget_storage_size");
/* Try to create the same attribute again (should fail) */
- ret = H5Acreate2(group, ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Acreate2");
+ ret_id = H5Acreate2(group, ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Acreate2");
/* Write attribute information */
ret = H5Awrite(attr, H5T_NATIVE_INT, attr_data2);
@@ -682,6 +683,7 @@ test_attr_compound_write(hid_t fapl)
hid_t attr; /* Attribute ID */
hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
hsize_t dims2[] = {ATTR4_DIM1,ATTR4_DIM2};
+ hid_t ret_id; /* Generic hid_t return value */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -725,8 +727,8 @@ test_attr_compound_write(hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret = H5Acreate2(dataset, ATTR4_NAME, tid1, sid2, H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Acreate2");
+ ret_id = H5Acreate2(dataset, ATTR4_NAME, tid1, sid2, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Acreate2");
/* Write complex attribute data */
ret = H5Awrite(attr, tid1, attr_data4);
@@ -917,6 +919,7 @@ test_attr_scalar_write(hid_t fapl)
hid_t sid1,sid2; /* Dataspace ID */
hid_t attr; /* Attribute ID */
hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ hid_t ret_id; /* Generic hid_t return value */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -943,8 +946,8 @@ test_attr_scalar_write(hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret = H5Acreate2(dataset, ATTR5_NAME, H5T_NATIVE_FLOAT, sid2, H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Acreate2");
+ ret_id = H5Acreate2(dataset, ATTR5_NAME, H5T_NATIVE_FLOAT, sid2, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Acreate2");
/* Write attribute information */
ret = H5Awrite(attr, H5T_NATIVE_FLOAT, &attr_data5);
@@ -1057,6 +1060,7 @@ test_attr_mult_write(hid_t fapl)
hsize_t dims2[] = {ATTR1_DIM1};
hsize_t dims3[] = {ATTR2_DIM1,ATTR2_DIM2};
hsize_t dims4[] = {ATTR3_DIM1,ATTR3_DIM2,ATTR3_DIM3};
+ hid_t ret_id; /* Generic hid_t return value */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1087,8 +1091,8 @@ test_attr_mult_write(hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Acreate2");
+ ret_id = H5Acreate2(dataset, ATTR1_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Acreate2");
/* Write 1st attribute data */
ret = H5Awrite(attr, H5T_NATIVE_INT, attr_data1);
@@ -1111,8 +1115,8 @@ test_attr_mult_write(hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret = H5Acreate2(dataset, ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Acreate2");
+ ret_id = H5Acreate2(dataset, ATTR2_NAME, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Acreate2");
/* Write 2nd attribute information */
ret = H5Awrite(attr, H5T_NATIVE_INT, attr_data2);
@@ -1135,8 +1139,8 @@ test_attr_mult_write(hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Try to create the same attribute again (should fail) */
- ret = H5Acreate2(dataset, ATTR3_NAME, H5T_NATIVE_DOUBLE, sid2, H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Acreate2");
+ ret_id = H5Acreate2(dataset, ATTR3_NAME, H5T_NATIVE_DOUBLE, sid2, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Acreate2");
/* Write 3rd attribute information */
ret = H5Awrite(attr, H5T_NATIVE_DOUBLE, attr_data3);
@@ -7203,6 +7207,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
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 */
@@ -7297,8 +7302,8 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
/* Check for opening an attribute on an object with no attributes */
- ret = H5Aopen_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Aopen_by_idx");
+ ret_id = H5Aopen_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Aopen_by_idx");
/* Create attributes, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
@@ -7330,8 +7335,8 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
/* Check for out of bound opening an attribute on an object */
- ret = H5Aopen_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u, H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Aopen_by_idx");
+ ret_id = H5Aopen_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Aopen_by_idx");
/* Test opening attributes by index stored compactly */
ret = attr_open_by_idx_check(my_dataset, idx_type, order, u);
@@ -7403,8 +7408,8 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end if */
/* Check for out of bound opening an attribute on an object */
- ret = H5Aopen_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u, H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Aopen_by_idx");
+ ret_id = H5Aopen_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u, H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Aopen_by_idx");
/* Test opening attributes by index stored compactly */
ret = attr_open_by_idx_check(my_dataset, idx_type, order, u);
@@ -7549,6 +7554,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
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 */
@@ -7618,14 +7624,14 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
/* Check for opening a non-existant attribute on an object with no attributes */
- ret = H5Aopen(my_dataset, "foo", H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Aopen");
+ ret_id = H5Aopen(my_dataset, "foo", H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Aopen");
- ret = H5Aopen_by_name(my_dataset, ".", "foo", H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Aopen_by_name");
+ ret_id = H5Aopen_by_name(my_dataset, ".", "foo", H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Aopen_by_name");
- ret = H5Aopen_by_name(fid, dsetname, "foo", H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Aopen_by_name");
+ ret_id = H5Aopen_by_name(fid, dsetname, "foo", H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Aopen_by_name");
/* Create attributes, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
@@ -7657,14 +7663,14 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
VERIFY(is_dense, FALSE, "H5O_is_attr_dense_test");
/* Check for opening a non-existant attribute on an object with compact attribute storage */
- ret = H5Aopen(my_dataset, "foo", H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Aopen");
+ ret_id = H5Aopen(my_dataset, "foo", H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Aopen");
- ret = H5Aopen_by_name(my_dataset, ".", "foo", H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Aopen_by_name");
+ ret_id = H5Aopen_by_name(my_dataset, ".", "foo", H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Aopen_by_name");
- ret = H5Aopen_by_name(fid, dsetname, "foo", H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Aopen_by_name");
+ ret_id = H5Aopen_by_name(fid, dsetname, "foo", H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Aopen_by_name");
/* Test opening attributes stored compactly */
ret = attr_open_check(fid, dsetname, my_dataset, u);
@@ -7739,14 +7745,14 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
} /* end if */
/* Check for opening a non-existant attribute on an object with dense attribute storage */
- ret = H5Aopen(my_dataset, "foo", H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Aopen");
+ ret_id = H5Aopen(my_dataset, "foo", H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Aopen");
- ret = H5Aopen_by_name(my_dataset, ".", "foo", H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Aopen_by_name");
+ ret_id = H5Aopen_by_name(my_dataset, ".", "foo", H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Aopen_by_name");
- ret = H5Aopen_by_name(fid, dsetname, "foo", H5P_DEFAULT, H5P_DEFAULT);
- VERIFY(ret, FAIL, "H5Aopen_by_name");
+ ret_id = H5Aopen_by_name(fid, dsetname, "foo", H5P_DEFAULT, H5P_DEFAULT);
+ VERIFY(ret_id, FAIL, "H5Aopen_by_name");
/* Test opening attributes stored compactly */
ret = attr_open_check(fid, dsetname, my_dataset, u);
diff --git a/test/th5s.c b/test/th5s.c
index ebbaa37..43ad1bb 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -1171,6 +1171,7 @@ test_h5s_encode(void)
H5S_sel_type sel_type;
H5S_class_t space_type;
hssize_t nblocks;
+ hid_t ret_id; /* Generic hid_t return value */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1195,9 +1196,9 @@ test_h5s_encode(void)
/* Try decoding bogus buffer */
H5E_BEGIN_TRY {
- ret = H5Sdecode(sbuf);
+ ret_id = H5Sdecode(sbuf);
} H5E_END_TRY;
- VERIFY(ret, FAIL, "H5Sdecode");
+ VERIFY(ret_id, FAIL, "H5Sdecode");
ret = H5Sencode(sid1, sbuf, &sbuf_size);
CHECK(ret, FAIL, "H5Sencode");
diff --git a/test/trefer.c b/test/trefer.c
index 7e08018..9cb7f26 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -83,6 +83,7 @@ test_reference_params(void)
unsigned *tu32; /* Temporary pointer to uint32 data */
int i; /* counting variables */
const char *write_comment = "Foo!"; /* Comments for group */
+ hid_t ret_id; /* Generic hid_t return value */
herr_t ret; /* Generic return value */
size_t name_size; /* Size of reference name */
@@ -210,12 +211,12 @@ test_reference_params(void)
VERIFY(name_size, FAIL, "H5Rget_name type");
/* Test parameters to H5Rget_region */
- ret = H5Rget_region((hid_t)-1, H5R_OBJECT, &rbuf[0]);
- VERIFY(ret, FAIL, "H5Rget_region loc_id");
- ret = H5Rget_region(fid1, H5R_OBJECT, NULL);
- VERIFY(ret, FAIL, "H5Rget_region ref");
- ret = H5Rget_region(fid1, H5R_OBJECT, &rbuf[0]);
- VERIFY(ret, FAIL, "H5Rget_region type");
+ ret_id = H5Rget_region((hid_t)-1, H5R_OBJECT, &rbuf[0]);
+ VERIFY(ret_id, FAIL, "H5Rget_region loc_id");
+ ret_id = H5Rget_region(fid1, H5R_OBJECT, NULL);
+ VERIFY(ret_id, FAIL, "H5Rget_region ref");
+ ret_id = H5Rget_region(fid1, H5R_OBJECT, &rbuf[0]);
+ VERIFY(ret_id, FAIL, "H5Rget_region type");
/* Close disk dataspace */
ret = H5Sclose(sid1);
diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c
index 742bb06..c1e63f1 100644
--- a/tools/h5repack/h5repack.c
+++ b/tools/h5repack/h5repack.c
@@ -337,7 +337,7 @@ done:
*/
int named_datatype_free(named_dt_t **named_dt_head_p, int ignore_err) {
named_dt_t *dt = *named_dt_head_p;
- hid_t ret_value = -1;
+ int ret_value = -1;
while (dt) {
/* Pop the datatype off the stack and free it */
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 44bea47..b5f6861 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -68,7 +68,7 @@ static herr_t walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void
/* get the major number from the error stack. */
static herr_t walk_error_callback(UNUSED unsigned n, const H5E_error2_t *err_desc, void *udata) {
if (err_desc)
- *((int *) udata) = err_desc->maj_num;
+ *((hid_t *) udata) = err_desc->maj_num;
return 0;
}
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 8918a97..ba1af19 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -1248,7 +1248,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
H5Dvlen_reclaim(p_type, sm_space, H5P_DEFAULT, sm_buf);
if(H5Sclose(sm_space) < 0)
- H5E_THROW(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
+ H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
if(sm_buf)
HDfree(sm_buf);
sm_buf = NULL;
@@ -1475,7 +1475,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_co
CATCH
if(f_space >= 0 && H5Sclose(f_space) < 0)
- H5E_THROW(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
+ H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
return ret_value;
}
@@ -1655,9 +1655,9 @@ CATCH
done:
if(sm_space >= 0 && H5Sclose(sm_space) < 0)
- H5E_THROW(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
+ H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
if(f_space >= 0 && H5Sclose(f_space) < 0)
- H5E_THROW(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed");
+ H5E_THROW(FAIL, H5E_tools_min_id_g, "H5Sclose failed");
return ret_value;
}