diff options
Diffstat (limited to 'test/tid.c')
-rw-r--r-- | test/tid.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -56,7 +56,7 @@ static int basic_id_test(void) /* Try to access IDs with ficticious types */ H5E_BEGIN_TRY - testPtr = H5Iobject_verify(100, (H5I_type_t) 0); + testPtr = H5Iobject_verify((hid_t)100, (H5I_type_t) 0); H5E_END_TRY VERIFY(testPtr, NULL, "H5Iobject_verify"); @@ -64,7 +64,7 @@ static int basic_id_test(void) goto out; H5E_BEGIN_TRY - testPtr = H5Iobject_verify(700, (H5I_type_t) 700); + testPtr = H5Iobject_verify((hid_t)700, (H5I_type_t) 700); H5E_END_TRY VERIFY(testPtr, NULL, "H5Iobject_verify"); @@ -81,13 +81,13 @@ static int basic_id_test(void) /* Register an ID and retrieve the object it points to. * Once the ID has been registered, testObj will be freed when * its ID type is destroyed. */ - testObj = malloc(7 * sizeof(int)); + testObj = HDmalloc(7 * sizeof(int)); arrayID = H5Iregister(myType, testObj); CHECK(arrayID, H5I_INVALID_HID, "H5Iregister"); if(arrayID == H5I_INVALID_HID) { - free(testObj); + HDfree(testObj); goto out; } @@ -175,13 +175,13 @@ static int basic_id_test(void) * freed when the previous type was destroyed. Allocate new * memory for it. */ - testObj = malloc(7 * sizeof(int)); + testObj = HDmalloc(7 * sizeof(int)); arrayID = H5Iregister(myType, testObj); CHECK(arrayID, H5I_INVALID_HID, "H5Iregister"); if(arrayID == H5I_INVALID_HID) { - free(testObj); + HDfree(testObj); goto out; } @@ -250,7 +250,7 @@ static int id_predefined_test(void ) void * testPtr; herr_t testErr; - testObj = malloc(sizeof(int)); + testObj = HDmalloc(sizeof(int)); /* Try to perform illegal functions on various predefined types */ H5E_BEGIN_TRY @@ -319,14 +319,14 @@ static int id_predefined_test(void ) /* testObj was never registered as an atom, so it will not be * automatically freed. */ - free(testObj); + HDfree(testObj); return 0; out: if(typeID != H5I_INVALID_HID) H5Tclose(typeID); if(testObj != NULL) - free(testObj); + HDfree(testObj); return -1; } @@ -393,7 +393,7 @@ static int test_is_valid(void) goto out; /* Check that an id of -1 is invalid */ - tri_ret = H5Iis_valid(-1); + tri_ret = H5Iis_valid((hid_t)-1); VERIFY(tri_ret, FALSE, "H4Iis_valid"); if (tri_ret != FALSE) goto out; @@ -427,13 +427,13 @@ static int test_get_type(void) goto out; /* Check that the ID is correct */ - type_ret = H5Iget_type(H5T_STRING); + type_ret = H5Iget_type((hid_t)H5T_STRING); VERIFY(type_ret, H5I_BADID, "H5Iget_type"); if (type_ret != H5I_BADID) goto out; /* Check that the ID is correct */ - type_ret = H5Iget_type(-1); + type_ret = H5Iget_type((hid_t)-1); VERIFY(type_ret, H5I_BADID, "H5Iget_type"); if (type_ret != H5I_BADID) goto out; |