summaryrefslogtreecommitdiffstats
path: root/src/H5Tbit.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-02-25 15:40:27 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-02-25 15:40:27 (GMT)
commit17535fbc174978ae71d916a02ee4dacee66a9d8c (patch)
treed3114488ba01370e6b21acca5915c4f771125713 /src/H5Tbit.c
parentd8b07ce1d025e3f4284c5038347097180fc2da11 (diff)
downloadhdf5-17535fbc174978ae71d916a02ee4dacee66a9d8c.zip
hdf5-17535fbc174978ae71d916a02ee4dacee66a9d8c.tar.gz
hdf5-17535fbc174978ae71d916a02ee4dacee66a9d8c.tar.bz2
[svn-r1101] Changes since 19990219
---------------------- ./config/irix64 The old (-32) compiler is now supported by setting envrionment CC='cc -32'. The -64 compiler is the default or you can set CC='cc -64'. ./src/H5A.c ./src/H5D.c ./src/H5F.c ./src/H5Fistore.c ./src/H5Flow.c ./src/H5G.c ./src/H5I.c ./src/H5Ocomp.c ./src/H5P.c ./src/H5R.c ./src/H5RA.c ./src/H5T.c ./src/H5Tbit.c ./src/H5Tconv.c ./src/H5Z.c ./src/H5detect.c ./test/big.c ./test/cmpd_dset.c ./test/dsets.c ./test/dtypes.c ./test/enum.c ./test/mtime.c ./test/ohdr.c ./tools/h5ls.c Fixed lots of warnings on Irix64. Mailed a few remaining warnings in H5S to Quincey and a few in the dumper to Ruey-Hsia.
Diffstat (limited to 'src/H5Tbit.c')
-rw-r--r--src/H5Tbit.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index ed074ab..f675794 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -314,6 +314,7 @@ H5T_bit_find (uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
{
ssize_t base=(ssize_t)offset;
ssize_t idx, i;
+ size_t iu;
/* Some functions call this with value=TRUE */
assert (TRUE==1);
@@ -322,14 +323,14 @@ H5T_bit_find (uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
switch (direction) {
case H5T_BIT_LSB:
/* Calculate index */
- idx = offset / 8;
+ idx = (ssize_t)(offset / 8);
offset %= 8;
/* Beginning */
if (offset) {
- for (i=offset; i<8 && size>0; i++, size--) {
- if (value==(hbool_t)((buf[idx]>>i) & 0x01)) {
- return 8*idx+i - base;
+ for (iu=offset; iu<8 && size>0; iu++, size--) {
+ if (value==(hbool_t)((buf[idx]>>iu) & 0x01)) {
+ return 8*idx+(ssize_t)iu - base;
}
}
offset = 0;
@@ -357,14 +358,14 @@ H5T_bit_find (uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
case H5T_BIT_MSB:
/* Calculate index */
- idx = (offset+size-1) / 8;
+ idx = (ssize_t)((offset+size-1) / 8);
offset %= 8;
/* Beginning */
if (size>8-offset && (offset+size)%8) {
- for (i=(offset+size)%8-1; i>=0; --i, --size) {
- if (value==(hbool_t)((buf[idx]>>i) & 0x01)) {
- return 8*idx+i - base;
+ for (iu=(offset+size)%8; iu>0; --iu, --size) {
+ if (value==(hbool_t)((buf[idx]>>(iu-1)) & 0x01)) {
+ return 8*idx+(ssize_t)(iu-1) - base;
}
}
--idx;
@@ -383,9 +384,9 @@ H5T_bit_find (uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
}
/* End */
if (size>0) {
- for (i=offset+size-1; i>=(ssize_t)offset; --i) {
- if (value==(hbool_t)((buf[idx]>>i) & 0x01)) {
- return 8*idx+i - base;
+ for (iu=offset+size; iu>offset; --iu) {
+ if (value==(hbool_t)((buf[idx]>>(iu-1)) & 0x01)) {
+ return 8*idx+(ssize_t)(iu-1) - base;
}
}
}