summaryrefslogtreecommitdiffstats
path: root/test/dsets.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/dsets.c')
-rw-r--r--test/dsets.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/dsets.c b/test/dsets.c
index b98730f..2a84173 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -734,7 +734,7 @@ test_types(hid_t file)
(space=H5Screate_simple(1, &nelmts, NULL))<0 ||
(dset=H5Dcreate(grp, "bitfield_1", type, space, H5P_DEFAULT))<0)
goto error;
- for (i=0; i<sizeof buf; i++) buf[i] = 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;
@@ -747,7 +747,7 @@ test_types(hid_t file)
(space=H5Screate_simple(1, &nelmts, NULL))<0 ||
(dset=H5Dcreate(grp, "bitfield_2", type, space, H5P_DEFAULT))<0)
goto error;
- for (i=0; i<sizeof buf; i++) buf[i] = 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;
@@ -761,7 +761,7 @@ test_types(hid_t file)
(space=H5Screate_simple(1, &nelmts, NULL))<0 ||
(dset=H5Dcreate(grp, "opaque_1", type, space, H5P_DEFAULT))<0)
goto error;
- for (i=0; i<sizeof buf; i++) buf[i] = 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;
@@ -775,7 +775,7 @@ test_types(hid_t file)
(space=H5Screate_simple(1, &nelmts, NULL))<0 ||
(dset=H5Dcreate(grp, "opaque_2", type, space, H5P_DEFAULT))<0)
goto error;
- for (i=0; i<sizeof buf; i++) buf[i] = 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;