summaryrefslogtreecommitdiffstats
path: root/testpar/t_file.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2022-04-05 13:20:19 (GMT)
committerGitHub <noreply@github.com>2022-04-05 13:20:19 (GMT)
commitbddd148fd29deb18439767c416199914845431b8 (patch)
tree9afaa591016c2ae1fe1978d4573c80303420d922 /testpar/t_file.c
parent99ba670f6add3bf83c0361537230e686f3976d1e (diff)
downloadhdf5-bddd148fd29deb18439767c416199914845431b8.zip
hdf5-bddd148fd29deb18439767c416199914845431b8.tar.gz
hdf5-bddd148fd29deb18439767c416199914845431b8.tar.bz2
Misc fixes from develop nov21 - feb22 (#1580)
* Make default to build high-level tools the same as default for (#1234) high-level library. * Updated README.txt to README.md (#1375) * H5Lexists docs: Removed reference to 1.8.16 since the change is the 1.8.x releases, HDFFV-11289 * H5Oget_info_by_name, name can be any object, not just a group * Converted README.txt to README.md and updated files referring to README.txt to README.md. * removed references to README.txt * updated MANIFEST * Snprintf2 (#1399) * Replaced many uses of sprintf with safer snprintf Many very straightforward, but in a few cases added a length parameter to some private functions, because buffer length was otherwise unknowable. * Removed unnecessary use of static on small buffers This improves thread safety. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Replaced several uses of sprintf with safer snprintf (#1383) * Replaced several uses of sprintf with safer snprintf * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Used clang-tidy to change all floating point f suffixes to F (#1359) * Added another missing override keyword on a dtor (#1384) * Creating FUNDING.yml (#1427) * Creating FUNDING.yml Will add sponsor this project widget to the repo's page. * Correct file name Add sponsor widget; filename typo fixed. * Update MANIFEST * Fixed AbstractDs::getVarLenType documentation (#1441) * Committing clang-format changes * Open bsd fixes (#1195) * Fix end of line alignment. Co-authored-by: Scot Breitenfeld <brtnfld@hdfgroup.org> Co-authored-by: Sean McBride <sean@rogue-research.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: loricooperhdf <lori.cooper@hdfgroup.org> Co-authored-by: myd7349 <myd7349@gmail.com>
Diffstat (limited to 'testpar/t_file.c')
-rw-r--r--testpar/t_file.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/testpar/t_file.c b/testpar/t_file.c
index 8bef7ae..a3be81d 100644
--- a/testpar/t_file.c
+++ b/testpar/t_file.c
@@ -514,25 +514,25 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
VRFY((mem_dataspace >= 0), "");
for (k = 0; k < NUM_DSETS; k++) {
- HDsprintf(dset_name, "D1dset%d", k);
+ HDsnprintf(dset_name, sizeof(dset_name), "D1dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
ret = H5Dclose(dset_id);
VRFY((ret == 0), "");
- HDsprintf(dset_name, "D2dset%d", k);
+ HDsnprintf(dset_name, sizeof(dset_name), "D2dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
ret = H5Dclose(dset_id);
VRFY((ret == 0), "");
- HDsprintf(dset_name, "D3dset%d", k);
+ HDsnprintf(dset_name, sizeof(dset_name), "D3dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
ret = H5Dclose(dset_id);
VRFY((ret == 0), "");
- HDsprintf(dset_name, "dset%d", k);
+ HDsnprintf(dset_name, sizeof(dset_name), "dset%d", k);
dset_id = H5Dcreate2(grp_id, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
VRFY((dset_id >= 0), "");
@@ -555,13 +555,13 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
for (i = 0; i < num_elements; i++)
VRFY((data_array[i] == mpi_rank + 1), "Dataset Verify failed");
- HDsprintf(dset_name, "D1dset%d", k);
+ HDsnprintf(dset_name, sizeof(dset_name), "D1dset%d", k);
ret = H5Ldelete(grp_id, dset_name, H5P_DEFAULT);
VRFY((ret == 0), "");
- HDsprintf(dset_name, "D2dset%d", k);
+ HDsnprintf(dset_name, sizeof(dset_name), "D2dset%d", k);
ret = H5Ldelete(grp_id, dset_name, H5P_DEFAULT);
VRFY((ret == 0), "");
- HDsprintf(dset_name, "D3dset%d", k);
+ HDsnprintf(dset_name, sizeof(dset_name), "D3dset%d", k);
ret = H5Ldelete(grp_id, dset_name, H5P_DEFAULT);
VRFY((ret == 0), "");
}
@@ -667,7 +667,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
VRFY((mem_dataspace >= 0), "");
for (k = 0; k < NUM_DSETS; k++) {
- HDsprintf(dset_name, "dset%d", k);
+ HDsnprintf(dset_name, sizeof(dset_name), "dset%d", k);
dset_id = H5Dopen2(grp_id, dset_name, H5P_DEFAULT);
VRFY((dset_id >= 0), "");