diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-03-01 18:48:54 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-03-01 18:48:54 (GMT) |
commit | d8e3d8e9082f0926e80e7e7010c00bda05a215b3 (patch) | |
tree | bf7717a29d0938ab15e6f54ef981e5abfcf467a5 /hl/test | |
parent | ac290b5e45412a0a93fde620490d703c773d27d4 (diff) | |
download | hdf5-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 'hl/test')
-rw-r--r-- | hl/test/test_dset_opt.c | 2 | ||||
-rw-r--r-- | hl/test/test_packet.c | 16 | ||||
-rw-r--r-- | hl/test/test_table.c | 38 |
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 c7a1c27..62e9ae3 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 c312296..8af6d28 100644 --- a/hl/test/test_table.c +++ b/hl/test/test_table.c @@ -218,7 +218,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]; @@ -246,18 +246,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 }; @@ -390,14 +390,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}} }; /*------------------------------------------------------------------------- |