diff options
author | kmu <kmu@hdfgroup.org> | 2019-11-25 18:48:51 (GMT) |
---|---|---|
committer | kmu <kmu@hdfgroup.org> | 2019-11-25 18:48:51 (GMT) |
commit | d242a900f420b040e364f6c0976c01593e955db3 (patch) | |
tree | 7b6849d8aff9ab9c9fe4b8f6ac40113e69454de3 /src/H5Tbit.c | |
parent | 3613ec7296a782c86ea5f0706a5a0cb51602abc9 (diff) | |
download | hdf5-d242a900f420b040e364f6c0976c01593e955db3.zip hdf5-d242a900f420b040e364f6c0976c01593e955db3.tar.gz hdf5-d242a900f420b040e364f6c0976c01593e955db3.tar.bz2 |
fix issues from previous PR comments
Diffstat (limited to 'src/H5Tbit.c')
-rw-r--r-- | src/H5Tbit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Tbit.c b/src/H5Tbit.c index c6c1777..1a7ea9b 100644 --- a/src/H5Tbit.c +++ b/src/H5Tbit.c @@ -363,7 +363,7 @@ H5T__bit_set(uint8_t *buf, size_t offset, size_t size, hbool_t value) /* The middle bytes */ while (size >= 8) { - buf[idx++] = (uint8_t)(value ? 0xff : 0x00); + ASSIGN_TO_SMALLER_SIZE(buf[idx++], uint8_t, value ? 0xff : 0x00, int); size -= 8; } @@ -532,7 +532,7 @@ H5T__bit_inc(uint8_t *buf, size_t start, size_t size) acc = buf[idx]; acc++; carry = acc & 0x100; - buf[idx] = (uint8_t)(acc & 0xff); + ASSIGN_TO_SMALLER_SIZE(buf[idx], uint8_t, acc & 0xff, unsigned); idx++; size -= 8; } |