From f3441d54866d0736468b2697bbbee3ec81a83a5b Mon Sep 17 00:00:00 2001 From: "H. Joe Lee" Date: Mon, 26 Jul 2021 15:18:15 -0500 Subject: [PATCH] OESS-168:Remove clang warnings. (#835) * OESS-168:Remove implicit conversion increases floating-point precision warnings. * OESS-168:Remove clang warnings. * OESS-168:Remove clang warnings. * Committing clang-format changes * OESS-168:Remove clang warnings. * Committing clang-format changes * OESS-168:Remove clang warning. * OESS-168:Remove clang warnings. * OESS-168:Address @byrnHDF review. * Remove line added to generated hl/src/H5LTanalyze.c file. Issue #854 created for creating a fix. * Remove extra whitespace from H5LTanalyze.c. * Remove extra blank line. Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Larry Knox --- hl/test/test_ds.c | 2 ++ hl/test/test_packet.c | 8 ++++---- hl/tools/h5watch/h5watchgentest.c | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c index 8c6ef91821..964e13f79a 100644 --- a/hl/test/test_ds.c +++ b/hl/test/test_ds.c @@ -5210,6 +5210,8 @@ test_attach_detach(void) HL_TESTING2("permutations of attaching and detaching"); + gid = var1_id = var2_id = var3_id = H5I_INVALID_HID; + if ((fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; diff --git a/hl/test/test_packet.c b/hl/test/test_packet.c index 1d3a569945..311f36aea8 100644 --- a/hl/test/test_packet.c +++ b/hl/test/test_packet.c @@ -45,10 +45,10 @@ typedef struct particle_t { * a static array of particles for writing and checking reads *------------------------------------------------------------------------- */ -static particle_t testPart[NRECORDS] = {{"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}}; +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}}; /*------------------------------------------------------------------------- * function that compares one particle diff --git a/hl/tools/h5watch/h5watchgentest.c b/hl/tools/h5watch/h5watchgentest.c index c83e485ba7..44cb0cbffa 100644 --- a/hl/tools/h5watch/h5watchgentest.c +++ b/hl/tools/h5watch/h5watchgentest.c @@ -224,7 +224,7 @@ main(void) one_cbuf[i].field2.b.a = 20; one_cbuf[i].field2.b.b = 40; one_cbuf[i].field2.b.c = 80; - one_cbuf[i].field3 = 3.0F; + one_cbuf[i].field3 = 3.0; one_cbuf[i].field4.a = 4; one_cbuf[i].field4.b = 8; } /* end for */ @@ -313,7 +313,7 @@ main(void) two_cbuf[i].field2.b.a = 20; two_cbuf[i].field2.b.b = 40; two_cbuf[i].field2.b.c = 80; - two_cbuf[i].field3 = 3.0F; + two_cbuf[i].field3 = 3.0; two_cbuf[i].field4.a = 4; two_cbuf[i].field4.b = 8; } /* end for */