summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKimmy Mu <kmu@hdfgroup.org>2020-01-06 18:17:10 (GMT)
committerkmu <kmu@hdfgroup.org>2020-01-09 22:15:38 (GMT)
commitde28f691ba42e295341ed1098caa1f3b980cc4eb (patch)
tree52a68c98d4e115da56c27a9310d7e112b82d04bd /test
parente75b2e3c2c6e47ccb55dddc40822b41c57ff273d (diff)
downloadhdf5-de28f691ba42e295341ed1098caa1f3b980cc4eb.zip
hdf5-de28f691ba42e295341ed1098caa1f3b980cc4eb.tar.gz
hdf5-de28f691ba42e295341ed1098caa1f3b980cc4eb.tar.bz2
merge intel warning fix
Diffstat (limited to 'test')
-rw-r--r--test/dsets.c8
-rw-r--r--test/dtypes.c4
-rw-r--r--test/h5test.c3
-rw-r--r--test/ntypes.c2
-rw-r--r--test/tsohm.c8
5 files changed, 12 insertions, 13 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 66313a5..5148b9b 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -5301,7 +5301,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++) buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ 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;
@@ -5315,7 +5315,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++) buf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ 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;
@@ -5330,7 +5330,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++)
- buf[i] = (unsigned char)0xff ^ (unsigned char)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;
if(H5Tclose(type) < 0) goto error;
@@ -5344,7 +5344,7 @@ test_types(hid_t file)
(dset = H5Dcreate2(grp, "opaque_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
for(i = 0; i < sizeof buf; i++)
- buf[i] = (unsigned char)0xff ^ (unsigned char)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;
if(H5Tclose(type) < 0) goto error;
diff --git a/test/dtypes.c b/test/dtypes.c
index a177026..6d81392 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -1179,8 +1179,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;
- s_ptr->b = (i*8+1) & 0x7fff;
- s_ptr->d = (i*8+6) & 0x7fff;
+ s_ptr->b = (int16_t)((i*8+1) & 0x7fff);
+ s_ptr->d = (int16_t)((i*8+6) & 0x7fff);
}
HDmemcpy(buf, orig, nelmts*sizeof(struct st));
diff --git a/test/h5test.c b/test/h5test.c
index 3cc2c35..b03f23c 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -1209,8 +1209,7 @@ h5_dump_info_object(MPI_Info info)
int flag;
int i, nkeys;
- HDprintf("Dumping MPI Info Object(%d) (up to %d bytes per item):\n", (int)info,
- MPI_MAX_INFO_VAL);
+ HDprintf("Dumping MPI Info Object (up to %d bytes per item):\n", MPI_MAX_INFO_VAL);
if (info==MPI_INFO_NULL){
HDprintf("object is MPI_INFO_NULL\n");
}
diff --git a/test/ntypes.c b/test/ntypes.c
index 83cdfd2..d3d10eb 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++)
- wbuf[i] = (unsigned char)0xff ^ (unsigned char)i;
+ 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 4329514..01ac3d2 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 = -1;
- hid_t orig_space_id = -1;
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t orig_space_id = H5I_INVALID_HID;
hid_t space1_id, space2_id, space3_id;
- hid_t dcpl_id = -1;
- hid_t dset1_id, dset2_id, dset3_id;
+ hid_t dcpl_id = H5I_INVALID_HID;
+ hid_t dset1_id, dset2_id = H5I_INVALID_HID, dset3_id = H5I_INVALID_HID;
hsize_t dims1[] = {1, 2};
hsize_t max_dims[] = {H5S_UNLIMITED, 2};
hsize_t dims2[] = {5, 2};