summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2005-05-06 19:19:34 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2005-05-06 19:19:34 (GMT)
commit314bfe6f3c732897047fe73de85979a3844bca0c (patch)
tree1406bdc54e4846f980a3faaf4da06e9ce9cf9247
parenta867893cdc79c3bdb0d665b4b0453659a5c47e54 (diff)
downloadhdf5-314bfe6f3c732897047fe73de85979a3844bca0c.zip
hdf5-314bfe6f3c732897047fe73de85979a3844bca0c.tar.gz
hdf5-314bfe6f3c732897047fe73de85979a3844bca0c.tar.bz2
[svn-r10733] Purpose:
Update H5Zscaleoffset.c so that it supports negative precision number. Description: Solution: Platforms tested: Linux 2.4 Misc. update: too minor to check in other platforms
-rw-r--r--src/H5Zscaleoffset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index 5093150..417d60b 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -915,7 +915,7 @@ H5Z_filter_scaleoffset (unsigned flags, size_t cd_nelmts, const unsigned cd_valu
unsigned dtype_class; /* datatype class */
unsigned dtype_sign; /* integer datatype sign */
unsigned filavail; /* flag indicating if fill value is defined or not */
- unsigned scale_factor = 0; /* scale factor */
+ int scale_factor = 0; /* scale factor */
unsigned scale_type = 0; /* scale type */
double D_val = 0.0; /* decimal scale factor */
uint32_t minbits = 0; /* minimum number of bits to store values */
@@ -957,7 +957,7 @@ H5Z_filter_scaleoffset (unsigned flags, size_t cd_nelmts, const unsigned cd_valu
dtype_class = cd_values[H5Z_SCALEOFFSET_PARM_CLASS];
dtype_sign = cd_values[H5Z_SCALEOFFSET_PARM_SIGN];
filavail = cd_values[H5Z_SCALEOFFSET_PARM_FILAVAIL];
- scale_factor = cd_values[H5Z_SCALEOFFSET_PARM_SCALEFACTOR];
+ scale_factor = (int) cd_values[H5Z_SCALEOFFSET_PARM_SCALEFACTOR];
scale_type = cd_values[H5Z_SCALEOFFSET_PARM_SCALETYPE];
/* check and assign proper values set by user to related parameters