summaryrefslogtreecommitdiffstats
path: root/test/cross_read.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/cross_read.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/cross_read.c')
-rw-r--r--test/cross_read.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/cross_read.c b/test/cross_read.c
index 2d95d15..35dd2ce 100644
--- a/test/cross_read.c
+++ b/test/cross_read.c
@@ -100,15 +100,15 @@ static int check_data(const char *dsetname, hid_t fid, hbool_t floating_number)
for (j = 0; j < NX; j++) {
for (i = 0; i < NY; i++) {
data_in[j][i] = ((double)(i + j + 1))/3;
- data_out[j][i] = 0;
+ data_out[j][i] = 0.0F;
int_data_in[j][i] = i + j;
int_data_out[j][i] = 0;
}
}
for (i = 0; i < NY; i++) {
- data_in[NX][i] = -2.2;
- data_out[NX][i] = 0;
+ data_in[NX][i] = -2.2F;
+ data_out[NX][i] = 0.0F;
int_data_in[NX][i] = -2;
int_data_out[NX][i] = 0;
@@ -126,7 +126,7 @@ static int check_data(const char *dsetname, hid_t fid, hbool_t floating_number)
/* Check results */
for (j=0; j<(NX+1); j++) {
for (i=0; i<NY; i++) {
- if (!DBL_REL_EQUAL(data_out[j][i], data_in[j][i], 0.001)) {
+ if (!DBL_REL_EQUAL(data_out[j][i], data_in[j][i], 0.001F)) {
if (!nerrors++) {
H5_FAILED();
printf("element [%d][%d] is %g but should have been %g\n",