diff options
Diffstat (limited to 'src/H5Tbit.c')
-rw-r--r-- | src/H5Tbit.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/H5Tbit.c b/src/H5Tbit.c index a52d538..f85ff14 100644 --- a/src/H5Tbit.c +++ b/src/H5Tbit.c @@ -46,9 +46,9 @@ void H5T_bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src, size_t src_offset, size_t size) { - unsigned shift; - unsigned mask_lo, mask_hi; - unsigned s_idx, d_idx; + size_t shift; + size_t mask_lo, mask_hi; + size_t s_idx, d_idx; /* * Normalize the offset to be a byte number and a bit offset within that @@ -76,8 +76,8 @@ H5T_bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src, * dst[d_idx+1] dst[d_idx] */ while(src_offset && size > 0) { - unsigned nbits = MIN3(size, 8 - dst_offset, 8 - src_offset); - unsigned mask = ((unsigned)1 << nbits) - 1; + size_t nbits = MIN3(size, 8 - dst_offset, 8 - src_offset); + size_t mask = ((size_t)1 << nbits) - 1; dst[d_idx] &= (uint8_t)~(mask << dst_offset); dst[d_idx] |= (uint8_t)(((src[s_idx] >> src_offset) & (uint8_t)mask) << dst_offset); @@ -119,7 +119,7 @@ H5T_bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src, * to line up with the destination. */ shift = dst_offset; - mask_lo = ((unsigned)1 << (8 - shift)) - 1; + mask_lo = ((size_t)1 << (8 - shift)) - 1; mask_hi = (~mask_lo) & 0xff; for(/*void*/; size > 8; size -= 8, d_idx++, s_idx++) { @@ -135,8 +135,8 @@ H5T_bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src, /* Finish up */ while(size > 0) { - unsigned nbits = (unsigned)MIN3 (size, 8 - dst_offset, 8 - src_offset); - unsigned mask = ((unsigned)1 << nbits) - 1; + size_t nbits = (size_t)MIN3 (size, 8 - dst_offset, 8 - src_offset); + size_t mask = ((size_t)1 << nbits) - 1; dst[d_idx] &= (uint8_t)(~(mask << dst_offset)); dst[d_idx] |= (uint8_t)(((src[s_idx] >> src_offset) & (uint8_t)mask) << dst_offset); @@ -185,7 +185,7 @@ H5T_bit_shift(uint8_t *buf, ssize_t shift_dist, size_t offset, size_t size) H5WB_t *wb = NULL; /* Wrapped buffer for temporary buffer */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5T_bit_shift, FAIL) + FUNC_ENTER_NOAPI(FAIL) /* Sanity check */ HDassert(buf); @@ -259,7 +259,7 @@ H5T_bit_get_d(uint8_t *buf, size_t offset, size_t size) size_t i, hs; uint64_t ret_value; /* Return value */ - FUNC_ENTER_NOAPI_NOFUNC(H5T_bit_get_d) + FUNC_ENTER_NOAPI_NOINIT_NOERR HDassert(8 * sizeof(val) >= size); @@ -417,8 +417,8 @@ H5T_bit_find(uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction, size_t iu; ssize_t ret_value = (-1); /* Return value */ - /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_bit_find) + /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOERR /* Some functions call this with value=TRUE */ HDassert(TRUE == 1); @@ -522,8 +522,8 @@ H5T_bit_inc(uint8_t *buf, size_t start, size_t size) unsigned carry = 1; unsigned acc, mask; - /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_bit_inc) + /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOERR HDassert(buf); @@ -593,8 +593,8 @@ H5T_bit_dec(uint8_t *buf, size_t start, size_t size) uint8_t tmp; unsigned borrow = 0; - /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_bit_dec) + /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOERR HDassert(buf); HDassert(size); @@ -668,8 +668,8 @@ H5T_bit_neg(uint8_t *buf, size_t start, size_t size) size_t pos = start % 8; uint8_t tmp[1]; - /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */ - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_bit_neg); + /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ + FUNC_ENTER_NOAPI_NOINIT_NOERR HDassert(buf); HDassert(size); |