diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-03-09 11:27:46 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-03-09 11:27:46 (GMT) |
commit | ab19d0636a2d490c34a3b40a39f14286b9557127 (patch) | |
tree | dcc2f31ca029891e9c808e628ffab1dd66a55764 /test/objcopy.c | |
parent | 85beb272c5038ffa2e2dfe95f60474e8ca616720 (diff) | |
download | hdf5-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/objcopy.c')
-rw-r--r-- | test/objcopy.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/objcopy.c b/test/objcopy.c index af0a835..d95a05e 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -2315,7 +2315,7 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t #endif /* H5_CLEAR_MEMORY */ for(i = 0; i < DIM_SIZE_1; i++) { buf[i].a = i; - buf[i].d = 1. / (i + 1); + buf[i].d = 1.0F / (i + 1); } /* end for */ /* Initialize the filenames */ @@ -2447,9 +2447,9 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* set initial data values */ for(i = 0; i < DIM_SIZE_1; i++) { - buf1d[i] = (float)(i / 2.0); + buf1d[i] = (float)(i / 2.0F); for(j = 0; j < DIM_SIZE_2; j++) - buf2d[i][j] = (float)(i + (j / 100.0)); + buf2d[i][j] = (float)(i + (j / 100.0F)); } /* end for */ /* Initialize the filenames */ @@ -2790,9 +2790,9 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, /* set initial data values */ for(i = 0; i < DIM_SIZE_1; i++) { - buf1d[i] = (float)(i / 10.0); + buf1d[i] = (float)(i / 10.0F); for(j = 0; j < DIM_SIZE_2; j++) - buf2d[i][j] = (float)(i + (j / 100.0)); + buf2d[i][j] = (float)(i + (j / 100.0F)); } /* end for */ /* Initialize the filenames */ @@ -2985,7 +2985,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid /* set initial data values */ for (i=0; i<DIM_SIZE_1; i++) for (j=0; j<DIM_SIZE_2; j++) - buf[i][j] = (float)(100.0); /* Something easy to compress */ + buf[i][j] = 100.0F; /* Something easy to compress */ /* Initialize the filenames */ h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); @@ -3114,7 +3114,7 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* set initial data values */ for (i=0; i<DIM_SIZE_1; i++) for (j=0; j<DIM_SIZE_2; j++) - buf[i][j] = (float)(i+j/100.0); + buf[i][j] = (float)(i+j/100.0F); /* Initialize the filenames */ h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename); @@ -7599,7 +7599,7 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, buf[i].b.p = (int *)HDmalloc(buf[i].b.len * sizeof(int)); for(j = 0; j < buf[i].b.len; j++) ((int *)buf[i].b.p)[j] = (int)(i * 10 + j); - buf[i].c = 1. / (i + 1.); + buf[i].c = 1.0F / (i + 1.0F); } /* end for */ /* Initialize the filenames */ @@ -7738,7 +7738,7 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl buf[i].b.p = (int *)HDmalloc(buf[i].b.len * sizeof(int)); for(j = 0; j < buf[i].b.len; j++) ((int *)buf[i].b.p)[j] = (int)(i * 10 + j); - buf[i].c = 1. / (i + 1.); + buf[i].c = 1.0F / (i + 1.0F); } /* end for */ /* Initialize the filenames */ @@ -7883,7 +7883,7 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl buf[i].b.p = (int *)HDmalloc(buf[i].b.len * sizeof(int)); for(j = 0; j < buf[i].b.len; j++) ((int *)buf[i].b.p)[j] = (int)(i * 10 + j); - buf[i].c = 1. / (i + 1.); + buf[i].c = 1.0F / (i + 1.0F); } /* end for */ /* Initialize the filenames */ |