summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-07-11 17:28:02 (GMT)
committerGitHub <noreply@github.com>2022-07-11 17:28:02 (GMT)
commite269f9036474b9d5b3c88d865e7bb20ecad5c54c (patch)
treeaa5313f198b044605d6b135cd4499cc2f91eacee /test
parent0412d3f292b255da700d865fd1eb990e05c038bb (diff)
downloadhdf5-e269f9036474b9d5b3c88d865e7bb20ecad5c54c.zip
hdf5-e269f9036474b9d5b3c88d865e7bb20ecad5c54c.tar.gz
hdf5-e269f9036474b9d5b3c88d865e7bb20ecad5c54c.tar.bz2
Misc clang warning fixes (#1869)
* Minor clang warning fixes in src and test * Fixes clang warnings in high-level library * clang format-nonliteral warning fixes * Committing clang-format changes * Fixed int -> float clang cast warnings in h5diff * Quiets some warnings in flex/bison generated code * Suppress overlong string warning for libinfo on clang Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'test')
-rw-r--r--test/dt_arith.c6
-rw-r--r--test/gen_plist.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/test/dt_arith.c b/test/dt_arith.c
index ae48045..9734eed 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -3069,12 +3069,12 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
hw = (unsigned char *)&hw_f;
}
else if (FLT_DOUBLE == dst_type) {
- hw_d = *((float *)aligned);
+ hw_d = (double)*((float *)aligned);
hw = (unsigned char *)&hw_d;
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
}
else {
- hw_ld = *((float *)aligned);
+ hw_ld = (long double)*((float *)aligned);
hw = (unsigned char *)&hw_ld;
#endif
}
@@ -3093,7 +3093,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst)
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
}
else {
- hw_ld = *((double *)aligned);
+ hw_ld = (long double)*((double *)aligned);
hw = (unsigned char *)&hw_ld;
#endif
}
diff --git a/test/gen_plist.c b/test/gen_plist.c
index 25d48cf..38f1b3d 100644
--- a/test/gen_plist.c
+++ b/test/gen_plist.c
@@ -164,7 +164,7 @@ main(void)
if ((ret = encode_plist(dxpl1, little_endian, word_length, "testfiles/plist_files/def_dxpl_")) < 0)
assert(ret > 0);
- if ((ret = H5Pset_btree_ratios(dxpl1, 0.2f, 0.6f, 0.2f)) < 0)
+ if ((ret = H5Pset_btree_ratios(dxpl1, 0.2, 0.6, 0.2)) < 0)
assert(ret > 0);
if ((ret = H5Pset_hyper_vector_size(dxpl1, 5)) < 0)
assert(ret > 0);
@@ -336,7 +336,7 @@ main(void)
assert(ret > 0);
if ((ret = H5Pset_alignment(fapl1, 2, 1024)) < 0)
assert(ret > 0);
- if ((ret = H5Pset_cache(fapl1, 1024, 128, 10485760, 0.3f)) < 0)
+ if ((ret = H5Pset_cache(fapl1, 1024, 128, 10485760, 0.3)) < 0)
assert(ret > 0);
if ((ret = H5Pset_elink_file_cache_size(fapl1, 10485760)) < 0)
assert(ret > 0);