summaryrefslogtreecommitdiffstats
path: root/test/th5s.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-03-01 18:48:54 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-03-01 18:48:54 (GMT)
commitd8e3d8e9082f0926e80e7e7010c00bda05a215b3 (patch)
treebf7717a29d0938ab15e6f54ef981e5abfcf467a5 /test/th5s.c
parentac290b5e45412a0a93fde620490d703c773d27d4 (diff)
downloadhdf5-d8e3d8e9082f0926e80e7e7010c00bda05a215b3.zip
hdf5-d8e3d8e9082f0926e80e7e7010c00bda05a215b3.tar.gz
hdf5-d8e3d8e9082f0926e80e7e7010c00bda05a215b3.tar.bz2
[svn-r26333] 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. Fixes: HDFFV-9148 Tested on: h5committest
Diffstat (limited to 'test/th5s.c')
-rw-r--r--test/th5s.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/th5s.c b/test/th5s.c
index d3a651c..94268a7 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -79,7 +79,7 @@ struct space4_struct {
unsigned u;
float f;
char c2;
- } space4_data={'v',987123,(float)-3.14,'g'}; /* Test data for 4th dataspace */
+ } space4_data={'v',987123,-3.14F,'g'}; /* Test data for 4th dataspace */
/****************************************************************
**
@@ -1647,7 +1647,7 @@ test_h5s_chunk(void)
/* Initialize float array */
for(i = 0; i < 50000; i++)
for(j = 0; j < 3; j++)
- chunk_data_flt[i][j] = (float)((i + 1) * 2.5 - j * 100.3);
+ chunk_data_flt[i][j] = (float)((i + 1) * 2.5F - j * 100.3F);
status = H5Dwrite(dsetID, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, chunk_data_flt);
CHECK(status, FAIL, "H5Dwrite");
@@ -1683,7 +1683,7 @@ test_h5s_chunk(void)
for(i=0; i<50000; i++) {
for(j=0; j<3; j++) {
/* Check if the two values are within 0.001% range. */
- if(!DBL_REL_EQUAL(chunk_data_dbl[i][j], chunk_data_flt[i][j], 0.00001))
+ if(!DBL_REL_EQUAL(chunk_data_dbl[i][j], chunk_data_flt[i][j], 0.00001F))
TestErrPrintf("%u: chunk_data_dbl[%d][%d]=%e, chunk_data_flt[%d][%d]=%e\n", (unsigned)__LINE__, i, j, chunk_data_dbl[i][j], i, j, chunk_data_flt[i][j]);
} /* end for */
} /* end for */