summaryrefslogtreecommitdiffstats
path: root/hl/test
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 /hl/test
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 'hl/test')
-rw-r--r--hl/test/test_dset_opt.c2
-rw-r--r--hl/test/test_packet.c16
-rw-r--r--hl/test/test_table.c38
3 files changed, 28 insertions, 28 deletions
diff --git a/hl/test/test_dset_opt.c b/hl/test/test_dset_opt.c
index bddd162..b0800a0 100644
--- a/hl/test/test_dset_opt.c
+++ b/hl/test/test_dset_opt.c
@@ -41,7 +41,7 @@
#define CHUNK_NX 4
#define CHUNK_NY 4
-#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s))*1.001)+12)
+#define DEFLATE_SIZE_ADJUST(s) (ceil(((double)(s))*1.001F)+12)
/* Temporary filter IDs used for testing */
#define H5Z_FILTER_BOGUS1 305
diff --git a/hl/test/test_packet.c b/hl/test/test_packet.c
index 9d3074d..a53b96d 100644
--- a/hl/test/test_packet.c
+++ b/hl/test/test_packet.c
@@ -54,14 +54,14 @@ typedef struct particle_t
*-------------------------------------------------------------------------
*/
static particle_t testPart[NRECORDS] = {
- {"zero", 0,0, 0.0f, 0.0},
- {"one", 10,10, 1.0f, 10.0},
- {"two", 20,20, 2.0f, 20.0},
- {"three",30,30, 3.0f, 30.0},
- {"four", 40,40, 4.0f, 40.0},
- {"five", 50,50, 5.0f, 50.0},
- {"six", 60,60, 6.0f, 60.0},
- {"seven",70,70, 7.0f, 70.0}
+ {"zero", 0,0, 0.0f, 0.0f},
+ {"one", 10,10, 1.0f, 10.0f},
+ {"two", 20,20, 2.0f, 20.0f},
+ {"three",30,30, 3.0f, 30.0f},
+ {"four", 40,40, 4.0f, 40.0f},
+ {"five", 50,50, 5.0f, 50.0f},
+ {"six", 60,60, 6.0f, 60.0f},
+ {"seven",70,70, 7.0f, 70.0f}
};
/*-------------------------------------------------------------------------
diff --git a/hl/test/test_table.c b/hl/test/test_table.c
index 4eb5819..4aac9de 100644
--- a/hl/test/test_table.c
+++ b/hl/test/test_table.c
@@ -227,7 +227,7 @@ static int test_table(hid_t fid, int do_write)
hsize_t chunk_size=10;
int compress=0;
int *fill=NULL;
- particle_t fill1[1] = { {"no data",-1, -99.0f, -99.0, -1} };
+ particle_t fill1[1] = { {"no data",-1, -99.0f, -99.0f, -1} };
int fill1_new[1] = { -100 };
hsize_t position;
char tname[20];
@@ -255,18 +255,18 @@ static int test_table(hid_t fid, int do_write)
particle2_t rbuf2[NRECORDS];
particle3_t rbuf3[NRECORDS];
particle_t rbufc[NRECORDS*2];
- particle_t abuf[2]={{"eight",80,8.0f,80.0,80},{"nine",90,9.0f,90.0,90}};
- particle_t ibuf[2]={{"zero", 0, 0.0f, 0.0, 0},{"zero", 0, 0.0f, 0.0, 0}};
+ particle_t abuf[2]={{"eight",80,8.0f,80.0f,80},{"nine",90,9.0f,90.0f,90}};
+ particle_t ibuf[2]={{"zero", 0, 0.0f, 0.0f, 0},{"zero", 0, 0.0f, 0.0f, 0}};
particle_t wbufd[NRECORDS];
particle_t wbuf[NRECORDS] = {
- {"zero", 0, 0.0f, 0.0, 0,},
- {"one", 10, 1.0f, 10.0, 10},
- {"two", 20, 2.0f, 20.0, 20},
- {"three",30, 3.0f, 30.0, 30},
- {"four", 40, 4.0f, 40.0, 40},
- {"five", 50, 5.0f, 50.0, 50},
- {"six", 60, 6.0f, 60.0, 60},
- {"seven",70, 7.0f, 70.0, 70}
+ {"zero", 0, 0.0f, 0.0f, 0,},
+ {"one", 10, 1.0f, 10.0f, 10},
+ {"two", 20, 2.0f, 20.0f, 20},
+ {"three",30, 3.0f, 30.0f, 30},
+ {"four", 40, 4.0f, 40.0f, 40},
+ {"five", 50, 5.0f, 50.0f, 50},
+ {"six", 60, 6.0f, 60.0f, 60},
+ {"seven",70, 7.0f, 70.0f, 70}
};
/* buffers for the field "Pressure" and "New_field" */
float pressure_in [NRECORDS] = { 0.0f,1.0f,2.0f,3.0f,4.0f,5.0f,6.0f,7.0f };
@@ -399,14 +399,14 @@ static int test_table(hid_t fid, int do_write)
/* Define an array of Particles */
particle4_t p_data[NRECORDS] = {
- {12112, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}},
- {12113, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}},
- {12114, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}},
- {12115, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}},
- {12116, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}},
- {12117, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}},
- {12118, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}},
- {12119, 1.4, 2.5, {1,2,3},{4,5,6}, {99,100}}
+ {12112, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
+ {12113, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
+ {12114, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
+ {12115, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
+ {12116, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
+ {12117, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
+ {12118, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}},
+ {12119, 1.4f, 2.5f, {1,2,3},{4,5,6}, {99,100}}
};
/*-------------------------------------------------------------------------