summaryrefslogtreecommitdiffstats
path: root/tools/misc
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-04-20 00:17:24 (GMT)
committerGitHub <noreply@github.com>2021-04-20 00:17:24 (GMT)
commit168c1245b4aa6fa4779b3df5cc050d0272abdc2e (patch)
tree6e4dc53920a8c2c0bbdb7cfb6f190e6703e80446 /tools/misc
parent100e132a62ae1aaf97f379684d04ed00d6016208 (diff)
downloadhdf5-168c1245b4aa6fa4779b3df5cc050d0272abdc2e.zip
hdf5-168c1245b4aa6fa4779b3df5cc050d0272abdc2e.tar.gz
hdf5-168c1245b4aa6fa4779b3df5cc050d0272abdc2e.tar.bz2
1 8 Merge dev changes for long double and cmake (#548)
* Update supported platforms * Merge PR#3 changes from develop * # WARNING: head commit changed in the meantime Merge gcc 10 diagnostics option from develop Merge CMake changes from develop Merge warnings from develop Merge #318 OSX changes from develop Merge tools changes from develop Merge test macros from develop * Format updates * Fix missing semicolon and format fix * Format update * Correct actions, remove java option * Update autotools build files * Add testfiles * Fix configure issue with make flags * Init fapls to default * Update generated files and fix h5repack id closure * update format * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup whitespace cleanup tools sync * format alignment * initialize vars * revert H5private change * Merge #380 from develop * Split format source and commit changes on repo push * Change windows TS to use older VS. * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * Update unsupported types with precision Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'tools/misc')
-rw-r--r--tools/misc/h5repart.c5
-rw-r--r--tools/misc/h5repart_gentest.c48
-rw-r--r--tools/misc/repart_test.c5
-rw-r--r--tools/misc/talign.c5
4 files changed, 36 insertions, 27 deletions
diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c
index ca93bb7..7f00d30 100644
--- a/tools/misc/h5repart.c
+++ b/tools/misc/h5repart.c
@@ -486,7 +486,10 @@ main(int argc, char *argv[])
* driver when the new file is opened. If the original file is a sec2 file and the
* new file can only be a sec2 file, reopen the new file should fail. There's
* nothing to do in this case. */
- H5E_BEGIN_TRY { file = H5Fopen(dst_gen_name, H5F_ACC_RDWR, fapl); }
+ H5E_BEGIN_TRY
+ {
+ file = H5Fopen(dst_gen_name, H5F_ACC_RDWR, fapl);
+ }
H5E_END_TRY;
if (file >= 0) {
diff --git a/tools/misc/h5repart_gentest.c b/tools/misc/h5repart_gentest.c
index 4aff7a5..22dce20 100644
--- a/tools/misc/h5repart_gentest.c
+++ b/tools/misc/h5repart_gentest.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu<slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* June 1, 2005
*
* Purpose: Generate a family file of 1024 bytes for each member
@@ -37,29 +37,29 @@ main(void)
/* Set property list and file name for FAMILY driver */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- perror("H5Pcreate");
- exit(EXIT_FAILURE);
+ HDperror("H5Pcreate");
+ HDexit(EXIT_FAILURE);
}
if (H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT) < 0) {
- perror("H5Pset_fapl_family");
- exit(EXIT_FAILURE);
+ HDperror("H5Pset_fapl_family");
+ HDexit(EXIT_FAILURE);
}
if ((file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) {
- perror("H5Fcreate");
- exit(EXIT_FAILURE);
+ HDperror("H5Fcreate");
+ HDexit(EXIT_FAILURE);
}
/* Create and write dataset */
if ((space = H5Screate_simple(2, dims, NULL)) < 0) {
- perror("H5Screate_simple");
- exit(EXIT_FAILURE);
+ HDperror("H5Screate_simple");
+ HDexit(EXIT_FAILURE);
}
if ((dset = H5Dcreate2(file, dname, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
- perror("H5Dcreate2");
- exit(EXIT_FAILURE);
+ HDperror("H5Dcreate2");
+ HDexit(EXIT_FAILURE);
}
for (i = 0; i < FAMILY_NUMBER; i++)
@@ -67,32 +67,32 @@ main(void)
buf[i][j] = i * 10000 + j;
if (H5Dwrite(dset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) {
- perror("H5Dwrite");
- exit(EXIT_FAILURE);
+ HDperror("H5Dwrite");
+ HDexit(EXIT_FAILURE);
}
if (H5Sclose(space) < 0) {
- perror("H5Sclose");
- exit(EXIT_FAILURE);
+ HDperror("H5Sclose");
+ HDexit(EXIT_FAILURE);
}
if (H5Dclose(dset) < 0) {
- perror("H5Dclose");
- exit(EXIT_FAILURE);
+ HDperror("H5Dclose");
+ HDexit(EXIT_FAILURE);
}
if (H5Pclose(fapl) < 0) {
- perror("H5Pclose");
- exit(EXIT_FAILURE);
+ HDperror("H5Pclose");
+ HDexit(EXIT_FAILURE);
}
if (H5Fclose(file) < 0) {
- perror("H5Fclose");
- exit(EXIT_FAILURE);
+ HDperror("H5Fclose");
+ HDexit(EXIT_FAILURE);
}
- puts(" PASSED");
- fflush(stdout);
+ HDputs(" PASSED");
+ HDfflush(stdout);
- return 0;
+ return EXIT_SUCCESS;
}
diff --git a/tools/misc/repart_test.c b/tools/misc/repart_test.c
index 528b10e..9098078 100644
--- a/tools/misc/repart_test.c
+++ b/tools/misc/repart_test.c
@@ -108,7 +108,10 @@ test_sec2_h5repart_opens(void)
return SUCCEED;
error:
- H5E_BEGIN_TRY { H5Fclose(fid); }
+ H5E_BEGIN_TRY
+ {
+ H5Fclose(fid);
+ }
H5E_END_TRY;
return FAIL;
diff --git a/tools/misc/talign.c b/tools/misc/talign.c
index 60e7e15..f214527 100644
--- a/tools/misc/talign.c
+++ b/tools/misc/talign.c
@@ -63,7 +63,10 @@ main(void)
return 1;
}
- H5E_BEGIN_TRY { (void)H5Ldelete(fil, setname, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ (void)H5Ldelete(fil, setname, H5P_DEFAULT);
+ }
H5E_END_TRY;
cs6 = H5Tcopy(H5T_C_S1);