summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2021-08-25 04:05:23 (GMT)
committerGitHub <noreply@github.com>2021-08-25 04:05:23 (GMT)
commit131402a92de9bbd5df60d5859c37c4820c60d6b9 (patch)
tree06e3f4cd947ece0c9d65e82020a7b993c1ce2848 /test
parente9765e6c09de2e278e2821faef656b6d61854196 (diff)
downloadhdf5-131402a92de9bbd5df60d5859c37c4820c60d6b9.zip
hdf5-131402a92de9bbd5df60d5859c37c4820c60d6b9.tar.gz
hdf5-131402a92de9bbd5df60d5859c37c4820c60d6b9.tar.bz2
More various warnings (#958)
* Committing clang-format changes * Fixed various -Wdouble-promotion warnings * Fixed -Wshadow warning for `optopt` conflict On macOS at least, there is a global various named `optopt` in unistd.h. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'test')
-rw-r--r--test/cache_common.c2
-rw-r--r--test/enc_dec_plist.c4
-rw-r--r--test/fillval.c6
-rw-r--r--test/hyperslab.c6
-rw-r--r--test/set_extent.c4
-rw-r--r--test/tattr.c7
-rw-r--r--test/timer.c18
-rw-r--r--test/tmisc.c2
-rw-r--r--test/tvltypes.c8
9 files changed, 28 insertions, 29 deletions
diff --git a/test/cache_common.c b/test/cache_common.c
index 07c70f0..2d88e05 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -4994,7 +4994,7 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d
}
else {
- expected_hit_rate = 0.0F;
+ expected_hit_rate = 0.0;
}
result = H5Fget_mdc_hit_rate(file_id, &hit_rate);
diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c
index 9b4879e..60b229a 100644
--- a/test/enc_dec_plist.c
+++ b/test/enc_dec_plist.c
@@ -350,7 +350,7 @@ main(void)
TESTING("DXPL Encoding/Decoding");
- if ((H5Pset_btree_ratios(dxpl, 0.2f, 0.6f, 0.2f)) < 0)
+ if ((H5Pset_btree_ratios(dxpl, 0.2, 0.6, 0.2)) < 0)
FAIL_STACK_ERROR
if ((H5Pset_hyper_vector_size(dxpl, 5)) < 0)
FAIL_STACK_ERROR
@@ -544,7 +544,7 @@ main(void)
FAIL_STACK_ERROR
if ((H5Pset_alignment(fapl, 2, 1024)) < 0)
FAIL_STACK_ERROR
- if ((H5Pset_cache(fapl, 1024, 128, 10485760, 0.3f)) < 0)
+ if ((H5Pset_cache(fapl, 1024, 128, 10485760, 0.3)) < 0)
FAIL_STACK_ERROR
if ((H5Pset_elink_file_cache_size(fapl, 10485760)) < 0)
FAIL_STACK_ERROR
diff --git a/test/fillval.c b/test/fillval.c
index 4215c89..8de6ef1 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -1050,7 +1050,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
for (u = 0; u < nelmts; u++) {
buf_c[u].a = 1111.11F;
buf_c[u].x = 2222;
- buf_c[u].y = 3333.3333F;
+ buf_c[u].y = 3333.3333;
buf_c[u].z = 'd';
}
if (H5Dwrite(dset2, ctype_id, mspace, fspace, H5P_DEFAULT, buf_c) < 0)
@@ -1304,7 +1304,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
goto error;
HDmemset(&fill_ctype, 0, sizeof(fill_ctype));
- fill_ctype.y = 4444.4444F;
+ fill_ctype.y = 4444.4444;
if (H5Pset_fill_value(dcpl, ctype_id, &fill_ctype) < 0)
goto error;
nerrors += test_rdwr_cases(file, dcpl, "dset11", &fill_ctype, H5D_FILL_TIME_ALLOC, layout,
@@ -1370,7 +1370,7 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
if (H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
goto error;
HDmemset(&fill_ctype, 0, sizeof(fill_ctype));
- fill_ctype.y = 4444.4444F;
+ fill_ctype.y = 4444.4444;
if (H5Pset_fill_value(dcpl, ctype_id, &fill_ctype) < 0)
goto error;
nerrors += test_rdwr_cases(file, dcpl, "dset12", &fill_ctype, H5D_FILL_TIME_ALLOC, layout, H5T_COMPOUND,
diff --git a/test/hyperslab.c b/test/hyperslab.c
index 1f57e3b..1c55259 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -585,10 +585,10 @@ test_multifill(size_t nx)
for (i = 0; i < nx; i++) {
src[i].left = 1111111;
- src[i].mid = 12345.6789F;
+ src[i].mid = 12345.6789;
src[i].right = 2222222;
dst[i].left = 3333333;
- dst[i].mid = 98765.4321F;
+ dst[i].mid = 98765.4321;
dst[i].right = 4444444;
} /* end for */
@@ -597,7 +597,7 @@ test_multifill(size_t nx)
* over and over again.
*/
fill.left = 55555555;
- fill.mid = 3.1415927F;
+ fill.mid = 3.1415927;
fill.right = 66666666;
src_stride = 0;
diff --git a/test/set_extent.c b/test/set_extent.c
index 156dd19..3078c2d 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -134,11 +134,11 @@ main(void)
TEST_ERROR
/* Set chunk cache so only part of the chunks can be cached on fapl */
- if (H5Pset_cache(fapl, 0, (size_t)8, 256 * sizeof(int), 0.75F) < 0)
+ if (H5Pset_cache(fapl, 0, (size_t)8, 256 * sizeof(int), 0.75) < 0)
TEST_ERROR
/* Disable chunk caching on fapl2 */
- if (H5Pset_cache(fapl2, 0, (size_t)0, (size_t)0, 0.0F) < 0)
+ if (H5Pset_cache(fapl2, 0, (size_t)0, (size_t)0, 0.0) < 0)
TEST_ERROR
/* Set the "use the latest version of the format" bounds for creating objects in the file */
diff --git a/test/tattr.c b/test/tattr.c
index b602222..756e139 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -95,8 +95,7 @@ int attr_data2[ATTR2_DIM1][ATTR2_DIM2] = {{7614, -416}, {197814, -3}}; /* Test d
#define ATTR3_DIM2 2
#define ATTR3_DIM3 2
double attr_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3] = {
- {{2.3F, -26.1F}, {0.123F, -10.0F}},
- {{973.23F, -0.91827F}, {2.0F, 23.0F}}}; /* Test data for 3rd attribute */
+ {{2.3, -26.1}, {0.123, -10.0}}, {{973.23, -0.91827}, {2.0, 23.0}}}; /* Test data for 3rd attribute */
#define ATTR4_NAME "Attr4"
#define ATTR4_RANK 2
@@ -113,8 +112,8 @@ struct attr4_struct {
double d;
char c;
} attr_data4[ATTR4_DIM1][ATTR4_DIM2] = {
- {{3, -26.1F, 'd'}, {-100000, 0.123F, '3'}},
- {{-23, 981724.2F, 'Q'}, {0, 2.0F, '\n'}}}; /* Test data for 4th attribute */
+ {{3, -26.1, 'd'}, {-100000, 0.123, '3'}},
+ {{-23, 981724.2, 'Q'}, {0, 2.0, '\n'}}}; /* Test data for 4th attribute */
#define ATTR5_NAME "Attr5"
#define ATTR5_RANK 0
diff --git a/test/timer.c b/test/timer.c
index bb474ca..11b7427 100644
--- a/test/timer.c
+++ b/test/timer.c
@@ -43,55 +43,55 @@ test_time_formatting(void)
TESTING("Time string formats");
/* < 0, N/A */
- s = H5_timer_get_time_string(-1.0F);
+ s = H5_timer_get_time_string(-1.0);
if (NULL == s || HDstrcmp(s, "N/A") != 0)
TEST_ERROR;
HDfree(s);
/* 0 0 */
- s = H5_timer_get_time_string(0.0F);
+ s = H5_timer_get_time_string(0.0);
if (NULL == s || HDstrcmp(s, "0.0 s") != 0)
TEST_ERROR;
HDfree(s);
/* < 1 us nanoseconds */
- s = H5_timer_get_time_string(123.0E-9F);
+ s = H5_timer_get_time_string(123.0E-9);
if (NULL == s || HDstrcmp(s, "123 ns") != 0)
TEST_ERROR;
HDfree(s);
/* < 1 ms microseconds */
- s = H5_timer_get_time_string(23.456E-6F);
+ s = H5_timer_get_time_string(23.456E-6);
if (NULL == s || HDstrcmp(s, "23.5 us") != 0)
TEST_ERROR;
HDfree(s);
/* < 1 s milliseconds */
- s = H5_timer_get_time_string(4.56789E-3F);
+ s = H5_timer_get_time_string(4.56789E-3);
if (NULL == s || HDstrcmp(s, "4.6 ms") != 0)
TEST_ERROR;
HDfree(s);
/* < 1 min seconds */
- s = H5_timer_get_time_string(3.14F);
+ s = H5_timer_get_time_string(3.14);
if (NULL == s || HDstrcmp(s, "3.14 s") != 0)
TEST_ERROR;
HDfree(s);
/* < 1 hr mins, secs */
- s = H5_timer_get_time_string(2521.0F);
+ s = H5_timer_get_time_string(2521.0);
if (NULL == s || HDstrcmp(s, "42 m 1 s") != 0)
TEST_ERROR;
HDfree(s);
/* < 1 d hrs, mins, secs */
- s = H5_timer_get_time_string(9756.0F);
+ s = H5_timer_get_time_string(9756.0);
if (NULL == s || HDstrcmp(s, "2 h 42 m 36 s") != 0)
TEST_ERROR;
HDfree(s);
/* > 1 d days, hrs, mins, secs */
- s = H5_timer_get_time_string(280802.0F);
+ s = H5_timer_get_time_string(280802.0);
if (NULL == s || HDstrcmp(s, "3 d 6 h 0 m 2 s") != 0)
TEST_ERROR;
HDfree(s);
diff --git a/test/tmisc.c b/test/tmisc.c
index 302da0d..b267330 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -5276,7 +5276,7 @@ test_misc28(void)
* bytes). */
fapl = H5Pcreate(H5P_FILE_ACCESS);
CHECK(fapl, FAIL, "H5Pcreate");
- ret = H5Pset_cache(fapl, MISC28_NSLOTS, MISC28_NSLOTS, MISC28_SIZE, 0.75F);
+ ret = H5Pset_cache(fapl, MISC28_NSLOTS, MISC28_NSLOTS, MISC28_SIZE, 0.75);
CHECK(ret, FAIL, "H5Pset_cache");
/* Create the dcpl and set the chunk size */
diff --git a/test/tvltypes.c b/test/tvltypes.c
index 50b2d7a..03a8ad3 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -2526,10 +2526,10 @@ test_vltypes_fill_value(void)
hsize_t small_dims[] = {SPACE4_DIM_SMALL};
hsize_t large_dims[] = {SPACE4_DIM_LARGE};
size_t dset_elmts = 0; /* Number of elements in a particular dataset */
- const dtype1_struct fill1 = {1, 2, "foobar", "", NULL, "\0", "dead",
- 3, 4.0F, 100.0F, 1.0F, "liquid", "meter"};
- const dtype1_struct wdata = {3, 4, "", NULL, "\0", "foo", "two", 6, 8.0F, 200.0F, 2.0F, "solid", "yard"};
- dtype1_struct * rbuf = NULL; /* Buffer for reading data */
+ const dtype1_struct fill1 = {1, 2, "foobar", "", NULL, "\0", "dead",
+ 3, 4.0, 100.0, 1.0, "liquid", "meter"};
+ const dtype1_struct wdata = {3, 4, "", NULL, "\0", "foo", "two", 6, 8.0, 200.0, 2.0, "solid", "yard"};
+ dtype1_struct * rbuf = NULL; /* Buffer for reading data */
size_t mem_used = 0; /* Memory used during allocation */
H5D_layout_t layout; /* Dataset storage layout */
char dset_name1[64], dset_name2[64]; /* Dataset names */