diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2022-04-05 13:20:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-05 13:20:19 (GMT) |
commit | bddd148fd29deb18439767c416199914845431b8 (patch) | |
tree | 9afaa591016c2ae1fe1978d4573c80303420d922 /test/genall5.c | |
parent | 99ba670f6add3bf83c0361537230e686f3976d1e (diff) | |
download | hdf5-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 'test/genall5.c')
-rw-r--r-- | test/genall5.c | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/test/genall5.c b/test/genall5.c index 05ad4a2..4fa6c01 100644 --- a/test/genall5.c +++ b/test/genall5.c @@ -306,7 +306,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) while ((pass) && (u < nlinks)) { char linkname[16]; - HDsprintf(linkname, "%u", u); + HDsnprintf(linkname, sizeof(linkname), "%u", u); if (0 == (u % 3)) { ret = H5Lcreate_soft(group_name, gid, linkname, H5P_DEFAULT, H5P_DEFAULT); @@ -474,7 +474,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) char linkname[16]; htri_t link_exists; - HDsprintf(linkname, "%u", u); + HDsnprintf(linkname, sizeof(linkname), "%u", u); link_exists = H5Lexists(gid, linkname, H5P_DEFAULT); if (link_exists < 0) { @@ -715,7 +715,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) while ((pass) && (u < nlinks)) { char linkname[16]; - HDsprintf(linkname, "%u", u); + HDsnprintf(linkname, sizeof(linkname), "%u", u); if (0 == (u % 3)) { ret = H5Lcreate_soft(group_name, gid, linkname, H5P_DEFAULT, H5P_DEFAULT); @@ -883,7 +883,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) char linkname[16]; htri_t link_exists; - HDsprintf(linkname, "%u", u); + HDsnprintf(linkname, sizeof(linkname), "%u", u); link_exists = H5Lexists(gid, linkname, H5P_DEFAULT); if (link_exists < 0) { @@ -1321,7 +1321,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) while ((pass) && (u < nlinks)) { char linkname[32]; - HDsprintf(linkname, "ln%d_%u", proc_num, u); + HDsnprintf(linkname, sizeof(linkname), "ln%d_%u", proc_num, u); if (0 == (u % 2)) { ret = H5Lcreate_soft(group_name, gid, linkname, H5P_DEFAULT, H5P_DEFAULT); @@ -1479,7 +1479,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) char linkname[32]; htri_t link_exists; - HDsprintf(linkname, "ln%d_%u", proc_num, u); + HDsnprintf(linkname, sizeof(linkname), "ln%d_%u", proc_num, u); link_exists = H5Lexists(gid, linkname, H5P_DEFAULT); if (link_exists < 0) { @@ -3056,26 +3056,26 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) /* Add & verify an empty "new style" group */ if (pass) { - HDsprintf(full_path, "%s/A", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path); HDassert(HDstrlen(full_path) < 1024); ns_grp_0(fid, full_path); } if (pass) { - HDsprintf(full_path, "%s/A", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ns_grp_0(fid, full_path); } /* Add & verify a compact "new style" group (3 link messages) */ if (pass) { - HDsprintf(full_path, "%s/B", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path); HDassert(HDstrlen(full_path) < 1024); ns_grp_c(fid, full_path, 3); } if (pass) { - HDsprintf(full_path, "%s/B", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ns_grp_c(fid, full_path, 3); } @@ -3084,26 +3084,26 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) * fractal heap) */ if (pass) { - HDsprintf(full_path, "%s/C", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path); HDassert(HDstrlen(full_path) < 1024); ns_grp_d(fid, full_path, 300); } if (pass) { - HDsprintf(full_path, "%s/C", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ns_grp_d(fid, full_path, 300); } /* Add & verify an empty "old style" group to file */ if (pass) { - HDsprintf(full_path, "%s/D", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path); HDassert(HDstrlen(full_path) < 1024); os_grp_0(fid, full_path); } if (pass) { - HDsprintf(full_path, "%s/D", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_os_grp_0(fid, full_path); } @@ -3112,13 +3112,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) * local heap) to file */ if (pass) { - HDsprintf(full_path, "%s/E", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path); HDassert(HDstrlen(full_path) < 1024); os_grp_n(fid, full_path, proc_num, 300); } if (pass) { - HDsprintf(full_path, "%s/E", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_os_grp_n(fid, full_path, proc_num, 300); } @@ -3127,13 +3127,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) * to file */ if (pass) { - HDsprintf(full_path, "%s/F", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path); HDassert(HDstrlen(full_path) < 1024); ds_ctg_i(fid, full_path, FALSE); } if (pass) { - HDsprintf(full_path, "%s/F", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_i(fid, full_path, FALSE); } @@ -3142,13 +3142,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) * to file */ if (pass) { - HDsprintf(full_path, "%s/G", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path); HDassert(HDstrlen(full_path) < 1024); ds_ctg_i(fid, full_path, TRUE); } if (pass) { - HDsprintf(full_path, "%s/G", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_i(fid, full_path, TRUE); } @@ -3157,13 +3157,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) * to file */ if (pass) { - HDsprintf(full_path, "%s/H", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path); HDassert(HDstrlen(full_path) < 1024); ds_chk_i(fid, full_path, FALSE); } if (pass) { - HDsprintf(full_path, "%s/H", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_chk_i(fid, full_path, FALSE); } @@ -3172,13 +3172,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) * to file */ if (pass) { - HDsprintf(full_path, "%s/I", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path); HDassert(HDstrlen(full_path) < 1024); ds_chk_i(fid, full_path, TRUE); } if (pass) { - HDsprintf(full_path, "%s/I", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_chk_i(fid, full_path, TRUE); } @@ -3187,13 +3187,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) * to file */ if (pass) { - HDsprintf(full_path, "%s/J", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path); HDassert(HDstrlen(full_path) < 1024); ds_cpt_i(fid, full_path, FALSE); } if (pass) { - HDsprintf(full_path, "%s/J", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_cpt_i(fid, full_path, FALSE); } @@ -3202,13 +3202,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) * to file */ if (pass) { - HDsprintf(full_path, "%s/K", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path); HDassert(HDstrlen(full_path) < 1024); ds_cpt_i(fid, full_path, TRUE); } if (pass) { - HDsprintf(full_path, "%s/K", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_cpt_i(fid, full_path, TRUE); } @@ -3217,13 +3217,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) * (but no data) to file */ if (pass) { - HDsprintf(full_path, "%s/L", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path); HDassert(HDstrlen(full_path) < 1024); ds_ctg_v(fid, full_path, FALSE); } if (pass) { - HDsprintf(full_path, "%s/L", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_v(fid, full_path, FALSE); } @@ -3232,13 +3232,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) * (and data) to file */ if (pass) { - HDsprintf(full_path, "%s/M", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path); HDassert(HDstrlen(full_path) < 1024); ds_ctg_v(fid, full_path, TRUE); } if (pass) { - HDsprintf(full_path, "%s/M", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_v(fid, full_path, TRUE); } @@ -3281,14 +3281,14 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) /* validate an empty "new style" group */ if (pass) { - HDsprintf(full_path, "%s/A", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ns_grp_0(fid, full_path); } /* validate a compact "new style" group (3 link messages) */ if (pass) { - HDsprintf(full_path, "%s/B", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ns_grp_c(fid, full_path, 3); } @@ -3297,14 +3297,14 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) * fractal heap) */ if (pass) { - HDsprintf(full_path, "%s/C", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ns_grp_d(fid, full_path, 300); } /* validate an empty "old style" group in file */ if (pass) { - HDsprintf(full_path, "%s/D", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_os_grp_0(fid, full_path); } @@ -3313,7 +3313,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) * local heap) */ if (pass) { - HDsprintf(full_path, "%s/E", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_os_grp_n(fid, full_path, proc_num, 300); } @@ -3322,7 +3322,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) * in file. */ if (pass) { - HDsprintf(full_path, "%s/F", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_i(fid, full_path, FALSE); } @@ -3331,7 +3331,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) * in file. */ if (pass) { - HDsprintf(full_path, "%s/G", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_i(fid, full_path, TRUE); } @@ -3340,7 +3340,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) * in file */ if (pass) { - HDsprintf(full_path, "%s/H", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_chk_i(fid, full_path, FALSE); } @@ -3349,7 +3349,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) * in file */ if (pass) { - HDsprintf(full_path, "%s/I", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_chk_i(fid, full_path, TRUE); } @@ -3358,7 +3358,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) * in file */ if (pass) { - HDsprintf(full_path, "%s/J", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_cpt_i(fid, full_path, FALSE); } @@ -3367,7 +3367,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) * in file */ if (pass) { - HDsprintf(full_path, "%s/K", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_cpt_i(fid, full_path, TRUE); } @@ -3376,7 +3376,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) * (but no data) to file */ if (pass) { - HDsprintf(full_path, "%s/L", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_v(fid, full_path, FALSE); } @@ -3385,7 +3385,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) * (and data) to file */ if (pass) { - HDsprintf(full_path, "%s/M", base_path); + HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path); HDassert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_v(fid, full_path, TRUE); } |