summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-10-28 20:49:40 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-10-28 20:49:40 (GMT)
commit143db84d88b335730d4d785dc50380f49b007a52 (patch)
tree39be067dd8045ae69bc50873b03cd630a1d3b7a1 /src
parent0f040c40f0b8759ea7af6b2dcbf6bb75e92e34dd (diff)
downloadhdf5-143db84d88b335730d4d785dc50380f49b007a52.zip
hdf5-143db84d88b335730d4d785dc50380f49b007a52.tar.gz
hdf5-143db84d88b335730d4d785dc50380f49b007a52.tar.bz2
[svn-r12821] Description:
Clean up compiler warnings, esp. on 64-bit Linux boxes. Tested on: FreeBSD/32 4.11 (sleipnir) w/threadsafe Linux/32 2.4 (heping) w/C++ & FORTRAN Linux/64 2.4 (mir) w/build-all & 1.6 compat
Diffstat (limited to 'src')
-rw-r--r--src/H5Distore.c10
-rw-r--r--src/H5Tconv.c56
-rw-r--r--src/H5Zscaleoffset.c10
3 files changed, 38 insertions, 38 deletions
diff --git a/src/H5Distore.c b/src/H5Distore.c
index e4e9eee..b857e0c 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -1056,7 +1056,7 @@ H5D_istore_iter_copy(H5F_t *f_src, hid_t dxpl_id, const void *_lt_key,
unsigned filter_mask = lt_key->filter_mask;
if(H5Z_pipeline(pline, H5Z_FLAG_REVERSE, &filter_mask, edc_read, cb_struct, &nbytes, &buf_size, &buf) < 0)
- HGOTO_ERROR(H5E_PLINE, H5E_READERROR, H5B_ITER_ERROR, "data pipeline read failed")
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, H5B_ITER_ERROR, "data pipeline read failed")
} /* end if */
/* Perform datatype conversion, if necessary */
@@ -1116,7 +1116,7 @@ H5D_istore_iter_copy(H5F_t *f_src, hid_t dxpl_id, const void *_lt_key,
if(is_compressed && (is_vlen || fix_ref) ) {
if(H5Z_pipeline(pline, 0, &(udata_dst.common.key.filter_mask), edc_read,
cb_struct, &nbytes, &buf_size, &buf) < 0)
- HGOTO_ERROR(H5E_PLINE, H5E_READERROR, H5B_ITER_ERROR, "output pipeline failed")
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, H5B_ITER_ERROR, "output pipeline failed")
udata_dst.common.key.nbytes = nbytes;
udata->buf = buf;
udata->buf_size = buf_size;
@@ -1241,7 +1241,7 @@ H5D_istore_flush_entry(const H5D_io_info_t *io_info, H5D_rdcc_ent_t *ent, hbool_
}
if (H5Z_pipeline(&(io_info->dset->shared->dcpl_cache.pline), 0, &(udata.common.key.filter_mask), io_info->dxpl_cache->err_detect,
io_info->dxpl_cache->filter_cb, &(udata.common.key.nbytes), &alloc, &buf)<0)
- HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "output pipeline failed")
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "output pipeline failed")
}
/*
@@ -1796,7 +1796,7 @@ H5D_istore_lock(const H5D_io_info_t *io_info,
if(pline->nused) {
if(H5Z_pipeline(pline, H5Z_FLAG_REVERSE, &(udata->common.key.filter_mask), io_info->dxpl_cache->err_detect,
io_info->dxpl_cache->filter_cb, &(udata->common.key.nbytes), &chunk_alloc, &chunk) < 0)
- HGOTO_ERROR(H5E_PLINE, H5E_READERROR, NULL, "data pipeline read failed")
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, NULL, "data pipeline read failed")
} /* end if */
#ifdef H5D_ISTORE_DEBUG
rdcc->nmisses++;
@@ -2816,7 +2816,7 @@ H5D_istore_allocate(H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite)
/* Push the chunk through the filters */
if (H5Z_pipeline(&pline, 0, &filter_mask, dxpl_cache->err_detect, dxpl_cache->filter_cb, &nbytes, &buf_size, &chunk)<0)
- HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "output pipeline failed")
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTFILTER, FAIL, "output pipeline failed")
/* Keep the number of bytes the chunk turned in to */
chunk_size=nbytes;
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 183a3ee..0dd1d98 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -3710,7 +3710,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if (H5T_bit_find (s, src.u.f.epos, src.u.f.esize,
H5T_BIT_LSB, TRUE)<0) {
/* +0 or -0 */
- H5T_bit_copy (d, dst.u.f.sign, s, src.u.f.sign, 1);
+ H5T_bit_copy (d, dst.u.f.sign, s, src.u.f.sign, (size_t)1);
H5T_bit_set (d, dst.u.f.epos, dst.u.f.esize, FALSE);
H5T_bit_set (d, dst.u.f.mpos, dst.u.f.msize, FALSE);
goto padding;
@@ -3729,14 +3729,14 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
}
if(except_ret == H5T_CONV_UNHANDLED) {
- H5T_bit_copy (d, dst.u.f.sign, s, src.u.f.sign, 1);
+ H5T_bit_copy (d, dst.u.f.sign, s, src.u.f.sign, (size_t)1);
H5T_bit_set (d, dst.u.f.epos, dst.u.f.esize, TRUE);
H5T_bit_set (d, dst.u.f.mpos, dst.u.f.msize, FALSE);
/*If the destination no implied mantissa bit, we'll need to set
*the 1st bit of mantissa to 1. The Intel-Linux long double is
*this case.*/
if (H5T_NORM_NONE==dst.u.f.norm)
- H5T_bit_set (d, dst.u.f.mpos+dst.u.f.msize-1, 1, TRUE);
+ H5T_bit_set (d, dst.u.f.mpos+dst.u.f.msize-1, (size_t)1, TRUE);
} else if(except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
reverse = FALSE;
@@ -3765,14 +3765,14 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
}
if(except_ret == H5T_CONV_UNHANDLED) {
- H5T_bit_copy (d, dst.u.f.sign, s, src.u.f.sign, 1);
+ H5T_bit_copy (d, dst.u.f.sign, s, src.u.f.sign, (size_t)1);
H5T_bit_set (d, dst.u.f.epos, dst.u.f.esize, TRUE);
H5T_bit_set (d, dst.u.f.mpos, dst.u.f.msize, FALSE);
/*If the destination no implied mantissa bit, we'll need to set
*the 1st bit of mantissa to 1. The Intel-Linux long double is
*this case.*/
if (H5T_NORM_NONE==dst.u.f.norm)
- H5T_bit_set (d, dst.u.f.mpos+dst.u.f.msize-1, 1, TRUE);
+ H5T_bit_set (d, dst.u.f.mpos+dst.u.f.msize-1, (size_t)1, TRUE);
} else if(except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
reverse = FALSE;
@@ -3797,7 +3797,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(except_ret == H5T_CONV_UNHANDLED) {
/* There are many NaN values, so we just set all bits of
* the significand. */
- H5T_bit_copy (d, dst.u.f.sign, s, src.u.f.sign, 1);
+ H5T_bit_copy (d, dst.u.f.sign, s, src.u.f.sign, (size_t)1);
H5T_bit_set (d, dst.u.f.epos, dst.u.f.esize, TRUE);
H5T_bit_set(d, dst.u.f.mpos, dst.u.f.msize, TRUE);
} else if(except_ret == H5T_CONV_HANDLED) {
@@ -3834,7 +3834,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
msize = bitno;
} else if (0==bitno) {
msize = 1;
- H5T_bit_set(s, src.u.f.mpos, 1, FALSE);
+ H5T_bit_set(s, src.u.f.mpos, (size_t)1, FALSE);
}
} else if (H5T_NORM_IMPLIED==src.u.f.norm) {
msize = src.u.f.msize;
@@ -3847,7 +3847,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
* The sign for the destination is the same as the sign for the
* source in all cases.
*/
- H5T_bit_copy (d, dst.u.f.sign, s, src.u.f.sign, 1);
+ H5T_bit_copy (d, dst.u.f.sign, s, src.u.f.sign, (size_t)1);
/*
* Calculate the true source exponent by adjusting according to
@@ -3931,7 +3931,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
bitno = (ssize_t)(mrsh+msize - dst.u.f.msize);
assert(bitno>=0 && (size_t)bitno<=msize);
/*If the 1st bit being cut off is set and source isn't denormalized.*/
- if(H5T_bit_get_d(s, mpos+bitno-1, 1) && !denormalized) {
+ if(H5T_bit_get_d(s, mpos+bitno-1, (size_t)1) && !denormalized) {
/*Don't do rounding if exponent is 111...110 and mantissa is 111...11.
*To do rounding and increment exponent in this case will create an infinity value.*/
if((H5T_bit_find(s, mpos+bitno, msize-bitno, H5T_BIT_LSB, FALSE)>=0 || expo<expo_max-1)) {
@@ -3939,7 +3939,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if (carry)
implied = 2;
}
- } else if(H5T_bit_get_d(s, mpos+bitno-1, 1) && denormalized)
+ } else if(H5T_bit_get_d(s, mpos+bitno-1, (size_t)1) && denormalized)
/*For either source or destination, denormalized value doesn't increment carry.*/
H5T_bit_inc(s, mpos+bitno-1, 1+msize-bitno);
}
@@ -3953,7 +3953,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
H5T_bit_set(d, dst.u.f.mpos, dst.u.f.msize, FALSE);
} else if (mrsh==dst.u.f.msize+1) {
H5T_bit_set(d, dst.u.f.mpos+1, dst.u.f.msize-1, FALSE);
- H5T_bit_set(d, dst.u.f.mpos, 1, TRUE);
+ H5T_bit_set(d, dst.u.f.mpos, (size_t)1, TRUE);
} else if (mrsh==dst.u.f.msize) {
H5T_bit_set(d, dst.u.f.mpos, dst.u.f.msize, FALSE);
H5T_bit_set_d(d, dst.u.f.mpos, MIN(2, dst.u.f.msize), (hsize_t)implied);
@@ -3961,7 +3961,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if (mrsh>0) {
H5T_bit_set(d, dst.u.f.mpos+dst.u.f.msize-mrsh, mrsh,
FALSE);
- H5T_bit_set_d(d, dst.u.f.mpos+dst.u.f.msize-mrsh, 2,
+ H5T_bit_set_d(d, dst.u.f.mpos+dst.u.f.msize-mrsh, (size_t)2,
(hsize_t)implied);
}
if (mrsh+msize>=dst.u.f.msize) {
@@ -4019,7 +4019,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
*/
if (dst.offset>0) {
assert (H5T_PAD_ZERO==dst.lsb_pad || H5T_PAD_ONE==dst.lsb_pad);
- H5T_bit_set (d, 0, dst.offset, (hbool_t)(H5T_PAD_ONE==dst.lsb_pad));
+ H5T_bit_set (d, (size_t)0, dst.offset, (hbool_t)(H5T_PAD_ONE==dst.lsb_pad));
}
if (dst.offset+dst.prec!=8*dst_p->shared->size) {
assert (H5T_PAD_ZERO==dst.msb_pad || H5T_PAD_ONE==dst.msb_pad);
@@ -9634,7 +9634,7 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/*
* Find the sign bit value of the source.
*/
- sign = H5T_bit_get_d(s, src.u.f.sign, 1);
+ sign = H5T_bit_get_d(s, src.u.f.sign, (size_t)1);
/*
* Check for special cases: +0, -0, +Inf, -Inf, NaN
@@ -9659,7 +9659,7 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(except_ret == H5T_CONV_UNHANDLED) {
if (H5T_SGN_2==dst.u.i.sign)
- H5T_bit_set (d, dst.prec-1, 1, TRUE);
+ H5T_bit_set (d, dst.prec-1, (size_t)1, TRUE);
} else if(except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
reverse = FALSE;
@@ -9705,7 +9705,7 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(except_ret == H5T_CONV_UNHANDLED) {
if (H5T_SGN_2==dst.u.i.sign)
- H5T_bit_set (d, dst.prec-1, 1, TRUE);
+ H5T_bit_set (d, dst.prec-1, (size_t)1, TRUE);
} else if(except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
reverse = FALSE;
@@ -9786,7 +9786,7 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
* V V V V
* buf[0] buf[1] buf[2] buf[3]
*/
- H5T_bit_copy(int_buf, 0, s, src.u.f.mpos, src.u.f.msize);
+ H5T_bit_copy(int_buf, (size_t)0, s, src.u.f.mpos, src.u.f.msize);
/*
* Restore the implicit bit for mantissa if it's implied.
@@ -9801,13 +9801,13 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
* 10...010111, expo=20, expo-msize=-3. Right-shift the sequence, we get
* 00010...10. The last three bits were dropped.
*/
- H5T_bit_shift(int_buf, (ssize_t)(expo-src.u.f.msize), 0, buf_size*8);
+ H5T_bit_shift(int_buf, (ssize_t)(expo-src.u.f.msize), (size_t)0, buf_size*8);
/*
* If expo is less than mantissa size, the frantional value is dropped off
* during conversion. Set exception type to be "truncate"
*/
- if (expo < src.u.f.msize && cb_struct.func)
+ if ((size_t)expo < src.u.f.msize && cb_struct.func)
truncated = TRUE;
/*
@@ -9815,7 +9815,7 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
* which is set? This is checked before converted to negative
* integer.
*/
- sfirst = H5T_bit_find(int_buf, 0, 8*buf_size, H5T_BIT_MSB, TRUE);
+ sfirst = H5T_bit_find(int_buf, (size_t)0, 8*buf_size, H5T_BIT_MSB, TRUE);
first = (size_t)sfirst;
if(sfirst < 0) {
@@ -9874,7 +9874,7 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(except_ret == H5T_CONV_UNHANDLED)
/*copy source value into it if case is ignored by user handler*/
- H5T_bit_copy (d, dst.offset, int_buf, 0, first+1);
+ H5T_bit_copy (d, dst.offset, int_buf, (size_t)0, first+1);
else if(except_ret == H5T_CONV_HANDLED) {
/*No need to reverse the order of destination because user handles it*/
reverse = FALSE;
@@ -9895,12 +9895,12 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(except_ret == H5T_CONV_UNHANDLED) { /*If this case ignored by user handler*/
/*Convert to integer representation. Equivalent to ~(value - 1).*/
- H5T_bit_dec(int_buf, 0, 8*buf_size);
- H5T_bit_neg(int_buf, 0, 8*buf_size);
+ H5T_bit_dec(int_buf, (size_t)0, 8*buf_size);
+ H5T_bit_neg(int_buf, (size_t)0, 8*buf_size);
/*copy source value into destination*/
- H5T_bit_copy (d, dst.offset, int_buf, 0, dst.prec-1);
- H5T_bit_set (d, (dst.offset + dst.prec-1), 1, TRUE);
+ H5T_bit_copy(d, dst.offset, int_buf, (size_t)0, dst.prec-1);
+ H5T_bit_set(d, (dst.offset + dst.prec-1), (size_t)1, TRUE);
} else if(except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception")
else if(except_ret == H5T_CONV_HANDLED) {
@@ -9920,7 +9920,7 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
}
if(except_ret == H5T_CONV_UNHANDLED)
- H5T_bit_set (d, (dst.offset + dst.prec-1), 1, TRUE);
+ H5T_bit_set (d, (dst.offset + dst.prec-1), (size_t)1, TRUE);
else if(except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception")
else if(except_ret == H5T_CONV_HANDLED) {
@@ -9958,7 +9958,7 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(except_ret == H5T_CONV_UNHANDLED) {
/*copy source value into it if case is ignored by user handler*/
- H5T_bit_copy (d, dst.offset, int_buf, 0, first+1);
+ H5T_bit_copy (d, dst.offset, int_buf, (size_t)0, first+1);
} else if(except_ret == H5T_CONV_ABORT)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception")
else if(except_ret == H5T_CONV_HANDLED) {
@@ -9976,7 +9976,7 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
*/
if (dst.offset>0) {
assert (H5T_PAD_ZERO==dst.lsb_pad || H5T_PAD_ONE==dst.lsb_pad);
- H5T_bit_set (d, 0, dst.offset, (hbool_t)(H5T_PAD_ONE==dst.lsb_pad));
+ H5T_bit_set(d, (size_t)0, dst.offset, (hbool_t)(H5T_PAD_ONE==dst.lsb_pad));
}
if (dst.offset+dst.prec!=8*dst_p->shared->size) {
assert (H5T_PAD_ZERO==dst.msb_pad || H5T_PAD_ONE==dst.msb_pad);
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index fe82e9c..2c55188 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -775,9 +775,9 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
/* Get the filter's current parameters */
#ifdef H5_WANT_H5_V1_6_COMPAT
- if(H5Pget_filter_by_id(dcpl_id,H5Z_FILTER_SCALEOFFSET,&flags,&cd_nelmts,cd_values,0,NULL)<0)
+ if(H5Pget_filter_by_id(dcpl_id, H5Z_FILTER_SCALEOFFSET, &flags, &cd_nelmts, cd_values, (size_t)0, NULL) < 0)
#else
- if(H5Pget_filter_by_id(dcpl_id,H5Z_FILTER_SCALEOFFSET,&flags,&cd_nelmts,cd_values,0,NULL,NULL)<0)
+ if(H5Pget_filter_by_id(dcpl_id, H5Z_FILTER_SCALEOFFSET, &flags, &cd_nelmts, cd_values, (size_t)0, NULL, NULL) < 0)
#endif
HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "can't get scaleoffset parameters")
@@ -882,7 +882,7 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
}
/* Modify the filter's parameters for this dataset */
- if(H5Pmodify_filter(dcpl_id, H5Z_FILTER_SCALEOFFSET, flags, H5Z_SCALEOFFSET_TOTAL_NPARMS, cd_values)<0)
+ if(H5Pmodify_filter(dcpl_id, H5Z_FILTER_SCALEOFFSET, flags, (size_t)H5Z_SCALEOFFSET_TOTAL_NPARMS, cd_values) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_CANTSET, FAIL, "can't set local scaleoffset parameters")
done:
@@ -1069,7 +1069,7 @@ H5Z_filter_scaleoffset (unsigned flags, size_t cd_nelmts, const unsigned cd_valu
}
/* before postprocess, get memory type */
- if((type = H5Z_scaleoffset_get_type(dtype_class, p.size, dtype_sign))==0)
+ if((type = H5Z_scaleoffset_get_type(dtype_class, (unsigned)p.size, dtype_sign)) == 0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "cannot use C integer datatype for cast")
/* postprocess after decompression */
@@ -1097,7 +1097,7 @@ H5Z_filter_scaleoffset (unsigned flags, size_t cd_nelmts, const unsigned cd_valu
H5Z_scaleoffset_convert(*buf, d_nelmts, p.size);
/* before preprocess, get memory type */
- if((type = H5Z_scaleoffset_get_type(dtype_class, p.size, dtype_sign))==0)
+ if((type = H5Z_scaleoffset_get_type(dtype_class, (unsigned)p.size, dtype_sign))==0)
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, 0, "cannot use C integer datatype for cast")
/* preprocess before compression */