summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/dsets.c8
-rw-r--r--test/dtypes.c4
-rw-r--r--test/ntypes.c2
-rw-r--r--test/th5s.c6
-rw-r--r--test/tsohm.c2
5 files changed, 11 insertions, 11 deletions
diff --git a/test/dsets.c b/test/dsets.c
index b32c5b6..21d5431 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++) buf[i] = (unsigned char)(0xff ^ i);
+ for(i=0; i<sizeof buf; i++) buf[i] = (unsigned char)0xff ^ (unsigned char)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++) buf[i] = (unsigned char)(0xff ^ i);
+ for(i=0; i<sizeof buf; i++) buf[i] = (unsigned char)0xff ^ (unsigned char)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++)
- buf[i] = (unsigned char)(0xff ^ i);
+ buf[i] = (unsigned char)0xff ^ (unsigned char)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;
@@ -5336,7 +5336,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 ^ i);
+ buf[i] = (unsigned char)0xff ^ (unsigned char)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 5238306..689336f 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;
- s_ptr->b = (short)((i*8+1) & 0x7fff);
- s_ptr->d = (short)((i*8+6) & 0x7fff);
+ s_ptr->b = (i*8+1) & 0x7fff;
+ s_ptr->d = (i*8+6) & 0x7fff;
}
HDmemcpy(buf, orig, nelmts*sizeof(struct st));
diff --git a/test/ntypes.c b/test/ntypes.c
index f1d2449..34558f5 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 ^ i);
+ wbuf[i] = (unsigned char)0xff ^ (unsigned char)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/th5s.c b/test/th5s.c
index ed02c16..1a4456a 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -1583,7 +1583,7 @@ test_h5s_encode1(void)
****************************************************************/
static herr_t
test_h5s_check_encoding(hid_t in_fapl, hid_t in_sid,
- uint32_t expected_version, uint32_t expected_enc_size, hbool_t expected_to_fail)
+ uint32_t expected_version, uint8_t expected_enc_size, hbool_t expected_to_fail)
{
char *buf = NULL; /* Pointer to the encoded buffer */
size_t buf_size; /* Size of the encoded buffer */
@@ -1697,7 +1697,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high)
unsigned unlim; /* H5S_UNLIMITED setting or not */
herr_t ret; /* Generic return value */
uint32_t expected_version = 0; /* Expected version for selection info */
- uint32_t expected_enc_size = 0; /* Expected encoded size for selection info */
+ uint8_t expected_enc_size = 0; /* Expected encoded size for selection info */
/* Output message about test being performed */
MESSAGE(5, ("Testing Dataspace encoding of regular hyperslabs\n"));
@@ -1912,7 +1912,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high)
for(config = CONFIG_8; config <= CONFIG_32; config++) {
hbool_t expected_to_fail = FALSE; /* Whether H5Sencode2 is expected to fail */
uint32_t expected_version = 0; /* Expected version for selection info */
- uint32_t expected_enc_size = 0; /* Expected encoded size for selection info */
+ uint8_t expected_enc_size = 0; /* Expected encoded size for selection info */
start = 0;
count = 2;
diff --git a/test/tsohm.c b/test/tsohm.c
index 0fc273b..a064940 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -3346,7 +3346,7 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen)
hid_t orig_space_id = -1;
hid_t space1_id, space2_id, space3_id;
hid_t dcpl_id = -1;
- hid_t dset1_id, dset2_id = -1, dset3_id = -1;
+ hid_t dset1_id, dset2_id, dset3_id;
hsize_t dims1[] = {1, 2};
hsize_t max_dims[] = {H5S_UNLIMITED, 2};
hsize_t dims2[] = {5, 2};