summaryrefslogtreecommitdiffstats
path: root/test/tattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/tattr.c')
-rw-r--r--test/tattr.c170
1 files changed, 85 insertions, 85 deletions
diff --git a/test/tattr.c b/test/tattr.c
index b252dbd..06c6a9a 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -879,8 +879,8 @@ test_attr_compound_read(hid_t fapl)
for(i = 0; i < ATTR4_DIM1; i++)
for(j = 0; j < ATTR4_DIM2; j++)
if(HDmemcmp(&attr_data4[i][j], &read_data4[i][j], sizeof(struct attr4_struct))) {
- printf("%d: attribute data different: attr_data4[%d][%d].i=%d, read_data4[%d][%d].i=%d\n", __LINE__, i, j, attr_data4[i][j].i, i, j, read_data4[i][j].i);
- printf("%d: attribute data different: attr_data4[%d][%d].d=%f, read_data4[%d][%d].d=%f\n", __LINE__, i, j, attr_data4[i][j].d, i, j, read_data4[i][j].d);
+ HDprintf("%d: attribute data different: attr_data4[%d][%d].i=%d, read_data4[%d][%d].i=%d\n", __LINE__, i, j, attr_data4[i][j].i, i, j, read_data4[i][j].i);
+ HDprintf("%d: attribute data different: attr_data4[%d][%d].d=%f, read_data4[%d][%d].d=%f\n", __LINE__, i, j, attr_data4[i][j].d, i, j, read_data4[i][j].d);
TestErrPrintf("%d: attribute data different: attr_data4[%d][%d].c=%c, read_data4[%d][%d].c=%c\n", __LINE__, i, j, attr_data4[i][j].c, i, j, read_data4[i][j].c);
} /* end if */
@@ -1017,7 +1017,7 @@ test_attr_scalar_read(hid_t fapl)
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!H5_FLT_ABS_EQUAL(rdata, attr_data5))
- printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
+ HDprintf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
"H5Aread", (double)attr_data5, (double)rdata, (int)__LINE__, __FILE__);
/* Get the attribute's dataspace */
@@ -2064,7 +2064,7 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
/* Re-open all the attributes by name and verify the data */
for(u = 0; u < max_attr; u++) {
/* Open attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Aopen(loc_id, attrname, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Aopen");
@@ -2088,7 +2088,7 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
CHECK(attr, FAIL, "H5Aopen_by_idx");
/* Verify Name */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, check_name);
VERIFY(name_len, HDstrlen(attrname), "H5Aget_name");
if(HDstrcmp(check_name, attrname))
@@ -2182,7 +2182,7 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for(u = 0; u < max_compact; u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2201,7 +2201,7 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2317,7 +2317,7 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for(u = 0; u < max_compact; u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2340,7 +2340,7 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
/* Add one more attribute, to push into "dense" storage */
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2457,7 +2457,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Add attributes, until well into dense storage */
for(u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2503,7 +2503,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
/* Delete attributes until the attributes revert to compact storage again */
for(u--; u >= min_dense; u--) {
/* Delete attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -2517,7 +2517,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
VERIFY(is_dense, TRUE, "H5O_is_attr_dense_test");
/* Delete one more attribute, which should cause reversion to compact storage */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -2530,7 +2530,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "test_attr_dense_verify");
/* Delete another attribute, to verify deletion in compact storage */
- sprintf(attrname, "attr %02u", (u - 1));
+ HDsprintf(attrname, "attr %02u", (u - 1));
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -2637,7 +2637,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
/* Add attributes, until well into dense storage */
for(u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, H5I_INVALID_HID, "H5Acreate2");
@@ -2650,7 +2650,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Aclose");
/* Rename attribute */
- sprintf(new_attrname, "new attr %02u", u);
+ HDsprintf(new_attrname, "new attr %02u", u);
/* Rename attribute */
ret = H5Arename_by_name(fid, DSET1_NAME, attrname, new_attrname, H5P_DEFAULT);
@@ -2704,7 +2704,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
unsigned value; /* Attribute value */
/* Open attribute */
- sprintf(attrname, "new attr %02u", u);
+ HDsprintf(attrname, "new attr %02u", u);
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
CHECK(attr, H5I_INVALID_HID, "H5Aopen");
@@ -2808,7 +2808,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
/* Add attributes, until well into dense storage */
for(u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2947,7 +2947,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 0;
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -2968,7 +2968,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 1;
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3000,7 +3000,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
/* Delete attribute */
u = 0;
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -3103,7 +3103,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for(u = 0; u < max_compact; u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3126,7 +3126,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(sid2, FAIL, "H5Screate_simple");
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3414,7 +3414,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Delete a few attributes until the storage switches to compact */
for(u = min_dense-1; u <= max_compact; u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
add_attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(add_attr, FAIL, "H5Acreate2");
@@ -3484,7 +3484,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
/* Add attributes, until just before converting to dense storage */
for(u = 0; u < max_compact; u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(gid1, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3646,7 +3646,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 0;
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3665,7 +3665,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 1;
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3684,7 +3684,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 2;
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
if(low == H5F_LIBVER_LATEST) {
CHECK(attr, FAIL, "H5Acreate2");
@@ -3708,7 +3708,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Create attribute */
u = 3;
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(dataset, attrname, H5T_NATIVE_UINT, big_sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -3731,7 +3731,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Delete attribute */
u = 1;
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -3746,7 +3746,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Delete attribute */
u = 3;
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -3761,7 +3761,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Delete attribute */
u = 2;
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -3776,7 +3776,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
/* Delete attribute */
u = 0;
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
ret = H5Adelete(dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -4187,7 +4187,7 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create many attributes */
for(u = 0; u < nattr; u++) {
- sprintf(attrname, "a-%06u", u);
+ HDsprintf(attrname, "a-%06u", u);
exists = H5Aexists(gid, attrname);
VERIFY(exists, FALSE, "H5Aexists");
@@ -4240,7 +4240,7 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
for(u = 0; u < nattr; u++) {
unsigned value; /* Attribute value */
- sprintf(attrname, "a-%06u", u);
+ HDsprintf(attrname, "a-%06u", u);
exists = H5Aexists(gid, attrname);
VERIFY(exists, TRUE, "H5Aexists");
@@ -4480,7 +4480,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
/* Create several attributes, but keep storage in compact form */
for(u = 0; u < max_compact; u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4570,7 +4570,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
H5A_info_t ainfo; /* Attribute information */
/* Retrieve information for attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
ret = H5Aget_info_by_name(my_dataset, ".", attrname, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_name");
@@ -4680,7 +4680,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
/* Create several attributes, but keep storage in compact form */
for(u = 0; u < max_compact; u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4703,7 +4703,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
} /* end for */
/* Create another attribute, to push into dense storage */
- sprintf(attrname, "attr %02u", max_compact);
+ HDsprintf(attrname, "attr %02u", max_compact);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -4797,7 +4797,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
H5A_info_t ainfo; /* Attribute information */
/* Retrieve information for attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
ret = H5Aget_info_by_name(my_dataset, ".", attrname, &ainfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_info_by_name");
@@ -5068,7 +5068,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Create several attributes, but keep storage in compact form */
for(u = 0; u < max_compact; u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5091,7 +5091,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Create another attribute, to push into dense storage */
- sprintf(attrname, "attr %02u", max_compact);
+ HDsprintf(attrname, "attr %02u", max_compact);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5119,7 +5119,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Delete several attributes from object, until attribute storage resumes compact form */
for(u = max_compact; u >= min_dense; u--) {
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5139,7 +5139,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
- sprintf(attrname, "attr %02u", (min_dense - 1));
+ HDsprintf(attrname, "attr %02u", (min_dense - 1));
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5155,7 +5155,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Re-add attributes to get back into dense form */
for(u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5243,7 +5243,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Delete several attributes from object, until attribute storage resumes compact form */
for(u = max_compact; u >= min_dense; u--) {
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5263,7 +5263,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
} /* end for */
/* Delete another attribute, to push attribute storage into compact form */
- sprintf(attrname, "attr %02u", (min_dense - 1));
+ HDsprintf(attrname, "attr %02u", (min_dense - 1));
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
@@ -5279,7 +5279,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Re-add attributes to get back into dense form */
for(u = (min_dense - 1); u < (max_compact + 1); u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5308,11 +5308,11 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
/* Delete all attributes */
for(u = max_compact; u > 0; u--) {
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
} /* end for */
- sprintf(attrname, "attr %02u", 0);
+ HDsprintf(attrname, "attr %02u", 0);
ret = H5Adelete(my_dataset, attrname);
CHECK(ret, FAIL, "H5Adelete");
} /* end for */
@@ -5449,7 +5449,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
/* Create attributes, until attribute storage is in dense form */
for(u = 0; u < max_compact * 2; u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5785,7 +5785,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -5822,7 +5822,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for(; u < (max_compact * 2); u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6023,7 +6023,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6095,9 +6095,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if(order == H5_ITER_INC)
- sprintf(attrname, "attr %02u", (u + 1));
+ HDsprintf(attrname, "attr %02u", (u + 1));
else
- sprintf(attrname, "attr %02u", (max_compact - (u + 2)));
+ HDsprintf(attrname, "attr %02u", (max_compact - (u + 2)));
ret = HDstrcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6133,7 +6133,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for(u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6220,9 +6220,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if(order == H5_ITER_INC)
- sprintf(attrname, "attr %02u", (u + 1));
+ HDsprintf(attrname, "attr %02u", (u + 1));
else
- sprintf(attrname, "attr %02u", ((max_compact * 2) - (u + 2)));
+ HDsprintf(attrname, "attr %02u", ((max_compact * 2) - (u + 2)));
ret = HDstrcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6266,7 +6266,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, to push into dense form */
for(u = 0; u < (max_compact * 2); u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -6331,9 +6331,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if(order == H5_ITER_INC)
- sprintf(attrname, "attr %02u", ((u * 2) + 1));
+ HDsprintf(attrname, "attr %02u", ((u * 2) + 1));
else
- sprintf(attrname, "attr %02u", ((max_compact * 2) - ((u * 2) + 2)));
+ HDsprintf(attrname, "attr %02u", ((max_compact * 2) - ((u * 2) + 2)));
ret = HDstrcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6380,9 +6380,9 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
HDmemset(tmpname, 0, (size_t)NAME_BUF_SIZE);
ret = (herr_t)H5Aget_name_by_idx(my_dataset, ".", idx_type, order, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
if(order == H5_ITER_INC)
- sprintf(attrname, "attr %02u", ((u * 2) + 3));
+ HDsprintf(attrname, "attr %02u", ((u * 2) + 3));
else
- sprintf(attrname, "attr %02u", ((max_compact * 2) - ((u * 2) + 4)));
+ HDsprintf(attrname, "attr %02u", ((max_compact * 2) - ((u * 2) + 4)));
ret = HDstrcmp(attrname, tmpname);
VERIFY(ret, 0, "H5Aget_name_by_idx");
} /* end for */
@@ -6472,7 +6472,7 @@ HDfprintf(stderr, "op_data->curr = %Hd\n", op_data->curr);
} /* end if */
/* Verify name of link */
- sprintf(attrname, "attr %02u", (unsigned)my_info.corder);
+ HDsprintf(attrname, "attr %02u", (unsigned)my_info.corder);
if(HDstrcmp(attr_name, attrname))
return(H5_ITER_ERROR);
@@ -6981,7 +6981,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7051,7 +7051,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for(u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7327,7 +7327,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7385,7 +7385,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for(u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7490,7 +7490,7 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id,
/* Open each attribute on object by index and check that it's the correct one */
for(u = 0; u < max_attrs; u++) {
/* Open the attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr_id = H5Aopen(obj_id, attrname, H5P_DEFAULT);
CHECK(attr_id, FAIL, "H5Aopen");
@@ -7655,7 +7655,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7722,7 +7722,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for(u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate2(my_dataset, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate2");
@@ -7899,7 +7899,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create attributes, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate_by_name");
@@ -7956,7 +7956,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Create more attributes, to push into dense form */
for(u = max_compact; u < (max_compact * 2); u++) {
/* Create attribute */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
attr = H5Acreate_by_name(fid, dsetname, attrname, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(attr, FAIL, "H5Acreate_by_name");
@@ -8175,7 +8175,7 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
/* Add attributes to each dataset, until after converting to dense storage */
for(u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if(u % 2) {
@@ -8501,7 +8501,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Add attributes to each dataset, until after converting to dense storage */
for(u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if(u % 2) {
@@ -8608,7 +8608,7 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
/* Create new attribute name */
- sprintf(attrname2, "new attr %02u", u);
+ HDsprintf(attrname2, "new attr %02u", u);
/* Change second dataset's attribute's name */
ret = H5Arename_by_name(fid, DSET2_NAME, attrname, attrname2, H5P_DEFAULT);
@@ -8942,7 +8942,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Add attributes to each dataset, until after converting to dense storage */
for(u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if(u % 2) {
@@ -9052,7 +9052,7 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
/* Delete attributes from second dataset */
for(u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
/* Delete second dataset's attribute */
ret = H5Adelete_by_name(fid, DSET2_NAME, attrname, H5P_DEFAULT);
@@ -9306,7 +9306,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Add attributes to each dataset, until after converting to dense storage */
for(u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
/* Alternate between creating "small" & "big" attributes */
if(u % 2) {
@@ -9433,7 +9433,7 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
/* Check ref count on attributes of first dataset */
for(u = 0; u < max_compact * 2; u++) {
/* Create attribute name */
- sprintf(attrname, "attr %02u", u);
+ HDsprintf(attrname, "attr %02u", u);
/* Open attribute on first dataset */
attr = H5Aopen(dataset, attrname, H5P_DEFAULT);
@@ -9705,7 +9705,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Create attributes on group */
for (i=0; i<BUG2_NATTR; i++) {
- sprintf(aname, "%03u", i);
+ HDsprintf(aname, "%03u", i);
aid = H5Acreate2(gid, aname, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -9715,7 +9715,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Delete every other attribute */
for (i=1; i<BUG2_NATTR; i+=2) {
- sprintf(aname, "%03u", i);
+ HDsprintf(aname, "%03u", i);
ret = H5Adelete(gid, aname);
CHECK(ret, FAIL, "H5Adelete");
}
@@ -9739,7 +9739,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Open an attribute in the middle */
i = (BUG2_NATTR / 4) * 2;
- sprintf(aname, "%03u", i);
+ HDsprintf(aname, "%03u", i);
aid = H5Aopen(gid, aname, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Aopen");
@@ -9782,7 +9782,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Create attributes on group */
for (i=0; i<BUG2_NATTR2; i++) {
- sprintf(aname, "%03u", i);
+ HDsprintf(aname, "%03u", i);
aid = H5Acreate2(gid, aname, H5T_STD_I32LE, sid, H5P_DEFAULT, H5P_DEFAULT);
CHECK(aid, FAIL, "H5Acreate2");
@@ -9792,7 +9792,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl)
/* Delete every other attribute */
for (i=0; i<BUG2_NATTR2; i++) {
- sprintf(aname, "%03u", i);
+ HDsprintf(aname, "%03u", i);
ret = H5Adelete(gid, aname);
CHECK(ret, FAIL, "H5Adelete");
}