summaryrefslogtreecommitdiffstats
path: root/test/cache.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-03-09 11:27:46 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-03-09 11:27:46 (GMT)
commitab19d0636a2d490c34a3b40a39f14286b9557127 (patch)
treedcc2f31ca029891e9c808e628ffab1dd66a55764 /test/cache.c
parent85beb272c5038ffa2e2dfe95f60474e8ca616720 (diff)
downloadhdf5-ab19d0636a2d490c34a3b40a39f14286b9557127.zip
hdf5-ab19d0636a2d490c34a3b40a39f14286b9557127.tar.gz
hdf5-ab19d0636a2d490c34a3b40a39f14286b9557127.tar.bz2
[svn-r26398] Merges r26333 from trunk
Eliminates gcc warnings due to -Wunsuffixed-float-constants. - Adds 'F' suffixes for most float constants. - A few constants MUST be of type double. These now receive the long double L suffix and are then cast to double. I do this via a new H5_DOUBLE() macro which was added to H5private.h. - Additionally, some 1.8-specific float suffixes were added. Fixes: HDFFV-9148 Tested on: h5committest
Diffstat (limited to 'test/cache.c')
-rw-r--r--test/cache.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/cache.c b/test/cache.c
index 27c61e7..26ef80f 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -20324,7 +20324,10 @@ check_auto_cache_resize(void)
auto_size_ctl.decr_mode = H5C_decr__age_out_with_threshold;
- auto_size_ctl.upper_hr_threshold = 0.999; /* for ease of testing */
+ /* NOTE: upper_hr_threshold MUST be type double (not float)
+ * or the cache test will fail on 64-bit systems.
+ */
+ auto_size_ctl.upper_hr_threshold = H5_DOUBLE(0.999); /* for ease of testing */
auto_size_ctl.decrement = 0.5f;
@@ -28337,7 +28340,7 @@ check_auto_cache_resize_aux_fcns(void)
pass = FALSE;
failure_mssg = "H5C_get_cache_hit_rate failed.\n";
- } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5, FP_EPSILON) ) { /* i.e. hit_rate != 0.5 */
+ } else if ( ! DBL_REL_EQUAL(hit_rate, 0.5F, FP_EPSILON) ) { /* i.e. hit_rate != 0.5 */
pass = FALSE;
failure_mssg =