diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-01-09 21:22:30 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-01-09 21:22:30 (GMT) |
commit | 35bc545296209684a5c46db0cde11beb9403a4dc (patch) | |
tree | 98b5a037ed928085b98abc1fee71fc62f81073c1 /src/H5Tbit.c | |
parent | 1290c4808d3e9890c765b1445f66b823c9026734 (diff) | |
download | hdf5-35bc545296209684a5c46db0cde11beb9403a4dc.zip hdf5-35bc545296209684a5c46db0cde11beb9403a4dc.tar.gz hdf5-35bc545296209684a5c46db0cde11beb9403a4dc.tar.bz2 |
[svn-r3252] Purpose:
Code cleanup.
Description:
Fixed _lots_ (I mean _tons_) of warnings spit out by the gcc with the
extra warnings. Including a few show-stoppers for compression on IRIX
machines.
Solution:
Changed lots of variables' types to more sensible and consistent types,
more range-checking, more variable typecasts, etc.
Platforms tested:
FreeBSD 4.2 (hawkwind), IRIX64-64 (modi4)
Diffstat (limited to 'src/H5Tbit.c')
-rw-r--r-- | src/H5Tbit.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/H5Tbit.c b/src/H5Tbit.c index f675794..284270e 100644 --- a/src/H5Tbit.c +++ b/src/H5Tbit.c @@ -216,19 +216,19 @@ H5T_bit_set_d (uint8_t *buf, size_t offset, size_t size, hsize_t val) assert (8*sizeof(val)>=size); switch (((H5T_t*)(H5I_object(H5T_NATIVE_INT_g)))->u.atomic.order) { - case H5T_ORDER_LE: - break; - - case H5T_ORDER_BE: - for (i=0, hs=sizeof(val)/2; i<hs; i++) { - uint8_t tmp = ((uint8_t*)&val)[i]; - ((uint8_t*)&val)[i] = ((uint8_t*)&val)[sizeof(val)-(i+1)]; - ((uint8_t*)&val)[sizeof(val)-(i+1)] = tmp; - } - break; - - default: - HDabort (); + case H5T_ORDER_LE: + break; + + case H5T_ORDER_BE: + for (i=0, hs=sizeof(val)/2; i<hs; i++) { + uint8_t tmp = ((uint8_t*)&val)[i]; + ((uint8_t*)&val)[i] = ((uint8_t*)&val)[sizeof(val)-(i+1)]; + ((uint8_t*)&val)[sizeof(val)-(i+1)] = tmp; + } + break; + + default: + HDabort (); } H5T_bit_copy (buf, offset, (uint8_t*)&val, 0, size); |