diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-05-04 15:49:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-04 15:49:01 (GMT) |
commit | 838d050a63d310a38f92a510dc94c0656a84bb51 (patch) | |
tree | 55fe7b05c0408ebf4b28c3bfb5cd9a1d04fb2502 /test/gen_bad_offset.c | |
parent | 19a59c29b93c04ae069881da2354d3d7048619b9 (diff) | |
download | hdf5-838d050a63d310a38f92a510dc94c0656a84bb51.zip hdf5-838d050a63d310a38f92a510dc94c0656a84bb51.tar.gz hdf5-838d050a63d310a38f92a510dc94c0656a84bb51.tar.bz2 |
h5test.h testing macros get enclosed in do..while loops (#1721)
* h5test.h testing macros get enclosed in do..while loops
* Adds missed macro in hl C++ code
* Fixes macro in Windows code
Diffstat (limited to 'test/gen_bad_offset.c')
-rw-r--r-- | test/gen_bad_offset.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/test/gen_bad_offset.c b/test/gen_bad_offset.c index b4ca70d..bacb652 100644 --- a/test/gen_bad_offset.c +++ b/test/gen_bad_offset.c @@ -58,43 +58,43 @@ main(void) /* Create the test file */ if ((fid = H5Fcreate(TESTFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Create two groups */ if ((gid1 = H5Gcreate2(fid, GRP1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if ((gid2 = H5Gcreate2(gid1, GRP2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Close the groups */ if (H5Gclose(gid1) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (H5Gclose(gid2) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Create soft links to the groups */ if (H5Lcreate_soft("/group1", fid, SOFT1, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if (H5Lcreate_soft("/group1/group2", fid, SOFT2, H5P_DEFAULT, H5P_DEFAULT) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Create a dataset */ if ((sid = H5Screate(H5S_SCALAR)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; if ((did = H5Dcreate2(fid, DSET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Close the dataset */ if (H5Dclose(did) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Close the dataspace */ if (H5Sclose(sid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Close the file */ if (H5Fclose(fid) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* * Write bad offset values at 3 locations in the file @@ -102,32 +102,32 @@ main(void) /* Open the file */ if ((fd = HDopen(TESTFILE, O_RDWR, 0663)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Position the file for /group1/group2: replace heap offset "8" by bad offset */ if (HDlseek(fd, (HDoff_t)880, SEEK_SET) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Write the bad offset value to the file */ if (HDwrite(fd, &val, sizeof(val)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Position the file for /dsetA: replace name offset into private heap "72" by bad offset */ if (HDlseek(fd, (HDoff_t)1512, SEEK_SET) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Write the bad offset value to the file */ if (HDwrite(fd, &val, sizeof(val)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Position the file for /soft_one: replace link value offset in the scratch pad "32" by bad offset */ if (HDlseek(fd, (HDoff_t)1616, SEEK_SET) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Write the bad offset value to the file */ if (HDwrite(fd, &val, sizeof(val)) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; /* Close the file */ if (HDclose(fd) < 0) - FAIL_STACK_ERROR + FAIL_STACK_ERROR; return EXIT_SUCCESS; |