summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2019-11-26 23:23:58 (GMT)
committerkmu <kmu@hdfgroup.org>2019-11-26 23:23:58 (GMT)
commit2bb0f52edfdd0ce11595ee673a934f306ca5c4fa (patch)
tree9be4fa9e5b48e88f993723daf1b13ebd03219f66 /test
parent4c8a2f726a2eb47a937430e28994db8be1b87b00 (diff)
downloadhdf5-2bb0f52edfdd0ce11595ee673a934f306ca5c4fa.zip
hdf5-2bb0f52edfdd0ce11595ee673a934f306ca5c4fa.tar.gz
hdf5-2bb0f52edfdd0ce11595ee673a934f306ca5c4fa.tar.bz2
Revert "fix issues from previous PR comments"
This reverts commit d242a900f420b040e364f6c0976c01593e955db3.
Diffstat (limited to 'test')
-rw-r--r--test/dsets.c6
-rw-r--r--test/dtypes.c4
-rw-r--r--test/ntypes.c2
-rw-r--r--test/tsohm.c8
4 files changed, 10 insertions, 10 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 15d319c..b32c5b6 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -5293,7 +5293,7 @@ test_types(hid_t file)
(space=H5Screate_simple(1, &nelmts, NULL)) < 0 ||
(dset=H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
- for(i=0; i<sizeof buf; i++) ASSIGN_TO_SMALLER_SIZE(buf[i], unsigned char, 0xff ^ i, size_t);
+ for(i=0; i<sizeof buf; i++) buf[i] = (unsigned char)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
@@ -5307,7 +5307,7 @@ test_types(hid_t file)
(space=H5Screate_simple(1, &nelmts, NULL)) < 0 ||
(dset=H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
- for(i=0; i<sizeof buf; i++) ASSIGN_TO_SMALLER_SIZE(buf[i], unsigned char, 0xff ^ i, size_t);
+ for(i=0; i<sizeof buf; i++) buf[i] = (unsigned char)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto error;
if(H5Sclose(space) < 0) goto error;
@@ -5322,7 +5322,7 @@ test_types(hid_t file)
(dset = H5Dcreate2(grp, "opaque_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
for(i = 0; i < sizeof buf; i++)
- ASSIGN_TO_SMALLER_SIZE(buf[i], unsigned char, 0xff ^ i, size_t);
+ buf[i] = (unsigned char)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) goto error;
if(H5Sclose(space) < 0) goto error;
if(H5Tclose(type) < 0) goto error;
diff --git a/test/dtypes.c b/test/dtypes.c
index 5369351..5238306 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -1216,8 +1216,8 @@ test_compound_6(void)
orig = (unsigned char*)HDmalloc(nelmts * sizeof(struct st));
for (i=0; i<(int)nelmts; i++) {
s_ptr = ((struct st*)((void *)orig)) + i;
- ASSIGN_TO_SMALLER_SIZE(s_ptr->b, short, (i*8+1) & 0x7fff, int);
- ASSIGN_TO_SMALLER_SIZE(s_ptr->d, short, (i*8+6) & 0x7fff, int);
+ s_ptr->b = (short)((i*8+1) & 0x7fff);
+ s_ptr->d = (short)((i*8+6) & 0x7fff);
}
HDmemcpy(buf, orig, nelmts*sizeof(struct st));
diff --git a/test/ntypes.c b/test/ntypes.c
index 03eefe6..f1d2449 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -2484,7 +2484,7 @@ test_opaque_dtype(hid_t file)
TEST_ERROR;
for(i = 0; i < sizeof(wbuf); i++)
- ASSIGN_TO_SMALLER_SIZE(wbuf[i], unsigned char, 0xff ^ i, size_t);
+ wbuf[i] = (unsigned char)(0xff ^ i);
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0) TEST_ERROR;
if(H5Sclose(space) < 0) TEST_ERROR;
diff --git a/test/tsohm.c b/test/tsohm.c
index c126608..0fc273b 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -3342,11 +3342,11 @@ test_sohm_extlink(void)
static int
verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen)
{
- hid_t file_id = H5I_INVALID_HID;
- hid_t orig_space_id = H5I_INVALID_HID;
+ hid_t file_id = -1;
+ hid_t orig_space_id = -1;
hid_t space1_id, space2_id, space3_id;
- hid_t dcpl_id = H5I_INVALID_HID;
- hid_t dset1_id, dset2_id = H5I_INVALID_HID, dset3_id = H5I_INVALID_HID;
+ hid_t dcpl_id = -1;
+ hid_t dset1_id, dset2_id = -1, dset3_id = -1;
hsize_t dims1[] = {1, 2};
hsize_t max_dims[] = {H5S_UNLIMITED, 2};
hsize_t dims2[] = {5, 2};