From 9df6eb131ae9ee7397202b5fe3828226d1d1e919 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 4 Oct 2024 13:20:44 -0700 Subject: [PATCH 1/3] Reformat using clang-format 17 Also bump the clang-format GitHub actions to 17 --- .github/workflows/clang-format-check.yml | 2 +- .github/workflows/clang-format-fix.yml | 2 +- HDF5Examples/C/H5T/h5ex_t_objref.c | 2 +- HDF5Examples/C/H5T/h5ex_t_objrefatt.c | 2 +- HDF5Examples/C/H5T/h5ex_t_regref.c | 2 +- HDF5Examples/C/H5T/h5ex_t_regrefatt.c | 2 +- HDF5Examples/C/TUTR/h5_extend.c | 4 +- HDF5Examples/CXX/TUTR/h5tutr_extend.cpp | 4 +- HDF5Examples/JAVA/H5T/H5Ex_T_Commit.java | 2 +- HDF5Examples/JAVA/H5T/H5Ex_T_Compound.java | 2 +- .../JAVA/H5T/H5Ex_T_CompoundAttribute.java | 2 +- c++/src/H5DataType.cpp | 4 +- c++/test/titerate.cpp | 8 +- fortran/src/H5_f.c | 22 ++-- hl/examples/ex_table_03.c | 2 +- hl/examples/ex_table_04.c | 2 +- hl/examples/ex_table_05.c | 2 +- hl/examples/ex_table_08.c | 2 +- hl/examples/ex_table_09.c | 2 +- hl/examples/ex_table_10.c | 2 +- hl/test/gen_test_ds.c | 6 +- hl/test/test_table.c | 20 +-- java/test/TestAll.java | 3 +- java/test/TestH5D.java | 4 +- java/test/TestH5F.java | 4 +- java/test/TestH5G.java | 2 +- java/test/TestH5Plist.java | 2 +- src/H5Apublic.h | 16 +-- src/H5B2private.h | 2 +- src/H5Bprivate.h | 14 +-- src/H5Cdbg.c | 2 +- src/H5Cpkg.h | 2 +- src/H5Cprivate.h | 2 +- src/H5Dchunk.c | 2 +- src/H5Defl.c | 2 +- src/H5Dpkg.h | 30 ++--- src/H5Dpublic.h | 8 +- src/H5EApkg.h | 2 +- src/H5EAprivate.h | 10 +- src/H5FAprivate.h | 10 +- src/H5FDdevelop.h | 2 +- src/H5FDhdfs.c | 2 +- src/H5FDlog.c | 2 +- src/H5FDmirror.c | 8 +- src/H5FDsec2.c | 2 +- src/H5FDstdio.c | 2 +- src/H5FSprivate.h | 6 +- src/H5Gpublic.h | 6 +- src/H5Iint.c | 2 +- src/H5Mpublic.h | 6 +- src/H5Odtype.c | 4 +- src/H5Opkg.h | 52 ++++---- src/H5Opublic.h | 6 +- src/H5Shyper.c | 2 +- src/H5TSprivate.h | 12 +- src/H5Tpkg.h | 2 +- src/H5Tpublic.h | 2 +- src/H5VLconnector.h | 46 +++---- src/H5encode.h | 32 ++--- src/H5private.h | 2 +- src/H5timer.c | 2 +- src/uthash.h | 52 ++++---- test/API/H5_api_async_test.c | 4 +- test/cache.c | 62 +++++----- test/dsets.c | 12 +- test/dtransform.c | 4 +- test/dtypes.c | 20 +-- test/earray.c | 8 +- test/enum.c | 8 +- test/farray.c | 8 +- test/fillval.c | 22 ++-- test/gen_filespace.c | 4 +- test/gen_plist.c | 58 ++++----- test/hdfs.c | 70 +++++------ test/set_extent.c | 4 +- test/tcoords.c | 10 +- test/testframe.c | 16 +-- test/tmeta.c | 8 +- test/tskiplist.c | 12 +- test/tsohm.c | 6 +- test/tvltypes.c | 2 +- test/unlink.c | 2 +- test/vds.c | 32 ++--- test/vds_env.c | 8 +- testpar/API/H5_api_async_test_parallel.c | 6 +- testpar/t_cache.c | 102 +++++++-------- testpar/t_coll_md.c | 2 +- testpar/t_mdset.c | 2 +- tools/lib/h5trav.c | 2 +- tools/libtest/h5tools_test_utils.c | 50 ++++---- tools/src/h5copy/h5copy.c | 20 +-- tools/src/h5dump/h5dump.c | 2 +- tools/src/h5dump/h5dump.h | 12 +- tools/src/h5dump/h5dump_extern.h | 14 +-- tools/src/h5ls/h5ls.c | 8 +- tools/test/h5diff/h5diffgentest.c | 30 ++--- tools/test/h5dump/h5dumpgentest.c | 116 +++++++++--------- tools/test/misc/h5clear_gentest.c | 2 +- tools/test/misc/h5perf_gentest.c | 18 +-- 99 files changed, 621 insertions(+), 612 deletions(-) diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index 8fd5b5fb8f7..f9651d16ea5 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -18,6 +18,6 @@ jobs: with: source: '.' extensions: 'c,h,cpp,hpp,java' - clangFormatVersion: 13 + clangFormatVersion: 17 style: file exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h' diff --git a/.github/workflows/clang-format-fix.yml b/.github/workflows/clang-format-fix.yml index a99d32d38ad..fb7e6957293 100644 --- a/.github/workflows/clang-format-fix.yml +++ b/.github/workflows/clang-format-fix.yml @@ -30,7 +30,7 @@ jobs: with: source: '.' extensions: 'c,h,cpp,hpp,java' - clangFormatVersion: 13 + clangFormatVersion: 17 inplace: True style: file exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h' diff --git a/HDF5Examples/C/H5T/h5ex_t_objref.c b/HDF5Examples/C/H5T/h5ex_t_objref.c index e6c2de95d66..db20bc0eb11 100644 --- a/HDF5Examples/C/H5T/h5ex_t_objref.c +++ b/HDF5Examples/C/H5T/h5ex_t_objref.c @@ -124,7 +124,7 @@ main(void) #if H5_VERSION_GE(1, 12, 0) && !defined(H5_USE_110_API) && !defined(H5_USE_18_API) && !defined(H5_USE_16_API) rdata = (H5R_ref_t *)malloc(dims[0] * sizeof(H5R_ref_t)); #else - rdata = (hobj_ref_t *)malloc(dims[0] * sizeof(hobj_ref_t)); + rdata = (hobj_ref_t *)malloc(dims[0] * sizeof(hobj_ref_t)); #endif /* * Read the data. diff --git a/HDF5Examples/C/H5T/h5ex_t_objrefatt.c b/HDF5Examples/C/H5T/h5ex_t_objrefatt.c index 562364a203e..9489bcb2f11 100644 --- a/HDF5Examples/C/H5T/h5ex_t_objrefatt.c +++ b/HDF5Examples/C/H5T/h5ex_t_objrefatt.c @@ -136,7 +136,7 @@ main(void) #if H5_VERSION_GE(1, 12, 0) && !defined(H5_USE_110_API) && !defined(H5_USE_18_API) && !defined(H5_USE_16_API) rdata = (H5R_ref_t *)malloc(dims[0] * sizeof(H5R_ref_t)); #else - rdata = (hobj_ref_t *)malloc(dims[0] * sizeof(hobj_ref_t)); + rdata = (hobj_ref_t *)malloc(dims[0] * sizeof(hobj_ref_t)); #endif /* * Read the data. diff --git a/HDF5Examples/C/H5T/h5ex_t_regref.c b/HDF5Examples/C/H5T/h5ex_t_regref.c index e6d4cef2c32..6766198cee6 100644 --- a/HDF5Examples/C/H5T/h5ex_t_regref.c +++ b/HDF5Examples/C/H5T/h5ex_t_regref.c @@ -154,7 +154,7 @@ main(void) #if H5_VERSION_GE(1, 12, 0) && !defined(H5_USE_110_API) && !defined(H5_USE_18_API) && !defined(H5_USE_16_API) rdata = (H5R_ref_t *)malloc(dims[0] * sizeof(H5R_ref_t)); #else - rdata = (hdset_reg_ref_t *)malloc(dims[0] * sizeof(hdset_reg_ref_t)); + rdata = (hdset_reg_ref_t *)malloc(dims[0] * sizeof(hdset_reg_ref_t)); #endif status = H5Sclose(space); diff --git a/HDF5Examples/C/H5T/h5ex_t_regrefatt.c b/HDF5Examples/C/H5T/h5ex_t_regrefatt.c index bb31b707c51..dab4e28cbaf 100644 --- a/HDF5Examples/C/H5T/h5ex_t_regrefatt.c +++ b/HDF5Examples/C/H5T/h5ex_t_regrefatt.c @@ -169,7 +169,7 @@ main(void) #if H5_VERSION_GE(1, 12, 0) && !defined(H5_USE_110_API) && !defined(H5_USE_18_API) && !defined(H5_USE_16_API) rdata = (H5R_ref_t *)malloc(dims[0] * sizeof(H5R_ref_t)); #else - rdata = (hdset_reg_ref_t *)malloc(dims[0] * sizeof(hdset_reg_ref_t)); + rdata = (hdset_reg_ref_t *)malloc(dims[0] * sizeof(hdset_reg_ref_t)); #endif status = H5Sclose(space); diff --git a/HDF5Examples/C/TUTR/h5_extend.c b/HDF5Examples/C/TUTR/h5_extend.c index 91d7db70fc9..0dde217db30 100644 --- a/HDF5Examples/C/TUTR/h5_extend.c +++ b/HDF5Examples/C/TUTR/h5_extend.c @@ -36,8 +36,8 @@ main(void) herr_t status; hsize_t chunk_dims[2] = {2, 5}; int data[3][3] = {{1, 1, 1}, /* data to write */ - {1, 1, 1}, - {1, 1, 1}}; + {1, 1, 1}, + {1, 1, 1}}; /* Variables used in extending and writing to the extended portion of dataset */ hsize_t size[2]; diff --git a/HDF5Examples/CXX/TUTR/h5tutr_extend.cpp b/HDF5Examples/CXX/TUTR/h5tutr_extend.cpp index 3916f9ab06c..53588abc72a 100644 --- a/HDF5Examples/CXX/TUTR/h5tutr_extend.cpp +++ b/HDF5Examples/CXX/TUTR/h5tutr_extend.cpp @@ -33,8 +33,8 @@ main(void) hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; hsize_t chunk_dims[2] = {2, 5}; int data[3][3] = {{1, 1, 1}, // data to write - {1, 1, 1}, - {1, 1, 1}}; + {1, 1, 1}, + {1, 1, 1}}; // Variables used in extending and writing to the extended portion of dataset diff --git a/HDF5Examples/JAVA/H5T/H5Ex_T_Commit.java b/HDF5Examples/JAVA/H5T/H5Ex_T_Commit.java index cd26a96e25b..379522cd5d2 100644 --- a/HDF5Examples/JAVA/H5T/H5Ex_T_Commit.java +++ b/HDF5Examples/JAVA/H5T/H5Ex_T_Commit.java @@ -73,7 +73,7 @@ private static class Sensor_Datatype { String[] memberNames = {"Serial number", "Location", "Temperature (F)", "Pressure (inHg)"}; long[] memberFileTypes = {HDF5Constants.H5T_STD_I32BE, HDF5Constants.H5T_C_S1, - HDF5Constants.H5T_IEEE_F64BE, HDF5Constants.H5T_IEEE_F64BE}; + HDF5Constants.H5T_IEEE_F64BE, HDF5Constants.H5T_IEEE_F64BE}; static int[] memberStorage = {INTEGERSIZE, MAXSTRINGSIZE, DOUBLESIZE, DOUBLESIZE}; // Data size is the storage size for the members not the object. diff --git a/HDF5Examples/JAVA/H5T/H5Ex_T_Compound.java b/HDF5Examples/JAVA/H5T/H5Ex_T_Compound.java index 21aeabc29f8..5bccd641127 100644 --- a/HDF5Examples/JAVA/H5T/H5Ex_T_Compound.java +++ b/HDF5Examples/JAVA/H5T/H5Ex_T_Compound.java @@ -43,7 +43,7 @@ static class Sensor_Datatype { static String[] memberNames = {"Serial number", "Location", "Temperature (F)", "Pressure (inHg)"}; static long[] memberMemTypes = {HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5T_C_S1, - HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5T_NATIVE_DOUBLE}; + HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5T_NATIVE_DOUBLE}; static long[] memberFileTypes = {HDF5Constants.H5T_STD_I32BE, HDF5Constants.H5T_C_S1, HDF5Constants.H5T_IEEE_F64BE, HDF5Constants.H5T_IEEE_F64BE}; static int[] memberStorage = {INTEGERSIZE, MAXSTRINGSIZE, DOUBLESIZE, DOUBLESIZE}; diff --git a/HDF5Examples/JAVA/H5T/H5Ex_T_CompoundAttribute.java b/HDF5Examples/JAVA/H5T/H5Ex_T_CompoundAttribute.java index a33faee9e59..86933ae6684 100644 --- a/HDF5Examples/JAVA/H5T/H5Ex_T_CompoundAttribute.java +++ b/HDF5Examples/JAVA/H5T/H5Ex_T_CompoundAttribute.java @@ -44,7 +44,7 @@ static class Sensor_Datatype { static String[] memberNames = {"Serial number", "Location", "Temperature (F)", "Pressure (inHg)"}; static long[] memberMemTypes = {HDF5Constants.H5T_NATIVE_INT, HDF5Constants.H5T_C_S1, - HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5T_NATIVE_DOUBLE}; + HDF5Constants.H5T_NATIVE_DOUBLE, HDF5Constants.H5T_NATIVE_DOUBLE}; static long[] memberFileTypes = {HDF5Constants.H5T_STD_I32BE, HDF5Constants.H5T_C_S1, HDF5Constants.H5T_IEEE_F64BE, HDF5Constants.H5T_IEEE_F64BE}; static int[] memberStorage = {INTEGERSIZE, MAXSTRINGSIZE, DOUBLESIZE, DOUBLESIZE}; diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp index 13b0decc022..98b7920b0a0 100644 --- a/c++/src/H5DataType.cpp +++ b/c++/src/H5DataType.cpp @@ -91,8 +91,8 @@ DataType::DataType(const H5T_class_t type_class, size_t size) ///\exception H5::ReferenceException //-------------------------------------------------------------------------- DataType::DataType(const H5Location &loc, const void *ref, H5R_type_t ref_type, const PropList &plist) - : H5Object(), id{H5Location::p_dereference(loc.getId(), ref, ref_type, plist, - "constructor - by dereference")}, + : H5Object(), + id{H5Location::p_dereference(loc.getId(), ref, ref_type, plist, "constructor - by dereference")}, encoded_buf(NULL), buf_size(0) { } diff --git a/c++/test/titerate.cpp b/c++/test/titerate.cpp index 958b1bda604..2f989ae40f0 100644 --- a/c++/test/titerate.cpp +++ b/c++/test/titerate.cpp @@ -30,17 +30,17 @@ using namespace H5; #define NDATASETS 50 /* Number of attributes for attribute iteration test */ -//#define NATTR 50 +// #define NATTR 50 /* Number of groups for second group iteration test */ -//#define ITER_NGROUPS 150 +// #define ITER_NGROUPS 150 /* General maximum length of names used */ #define NAMELEN 80 /* 1-D dataset with fixed dimensions */ -//#define SPACE1_RANK 1 -//#define SPACE1_DIM1 4 +// #define SPACE1_RANK 1 +// #define SPACE1_DIM1 4 const H5std_string FILE_ITERATE("titerate.h5"); const H5std_string GROUP1("Top Group"); diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 4dd54b0118f..ac3c7bfceed 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -569,17 +569,17 @@ h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid h5fd_flags[20] = (int_f)SELECT_IOC_TOTAL; h5fd_flags[21] = (int_f)ioc_selection_options; #else - h5fd_flags[11] = 0; - h5fd_flags[12] = 0; - h5fd_flags[13] = 0; - h5fd_flags[14] = 0; - h5fd_flags[15] = 0; - h5fd_flags[16] = 0; - h5fd_flags[17] = 0; - h5fd_flags[18] = 0; - h5fd_flags[19] = 0; - h5fd_flags[20] = 0; - h5fd_flags[21] = 0; + h5fd_flags[11] = 0; + h5fd_flags[12] = 0; + h5fd_flags[13] = 0; + h5fd_flags[14] = 0; + h5fd_flags[15] = 0; + h5fd_flags[16] = 0; + h5fd_flags[17] = 0; + h5fd_flags[18] = 0; + h5fd_flags[19] = 0; + h5fd_flags[20] = 0; + h5fd_flags[21] = 0; #endif /* diff --git a/hl/examples/ex_table_03.c b/hl/examples/ex_table_03.c index 694eeb50277..280c6a4f571 100644 --- a/hl/examples/ex_table_03.c +++ b/hl/examples/ex_table_03.c @@ -47,7 +47,7 @@ main(void) Particle p = {"zero", 0, 0, 0.0F, 0.0}; size_t dst_sizes[NFIELDS] = {sizeof(p.name), sizeof(p.lati), sizeof(p.longi), sizeof(p.pressure), - sizeof(p.temperature)}; + sizeof(p.temperature)}; /* Define field information */ const char *field_names[NFIELDS] = {"Name", "Latitude", "Longitude", "Pressure", "Temperature"}; diff --git a/hl/examples/ex_table_04.c b/hl/examples/ex_table_04.c index 4960173a3be..ba7b4363557 100644 --- a/hl/examples/ex_table_04.c +++ b/hl/examples/ex_table_04.c @@ -56,7 +56,7 @@ main(void) size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi), HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)}; size_t dst_sizes[NFIELDS] = {sizeof(dst_buf[0].name), sizeof(dst_buf[0].lati), sizeof(dst_buf[0].longi), - sizeof(dst_buf[0].pressure), sizeof(dst_buf[0].temperature)}; + sizeof(dst_buf[0].pressure), sizeof(dst_buf[0].temperature)}; size_t field_offset_pos[2] = {HOFFSET(Position, lati), HOFFSET(Position, longi)}; const char *field_names[NFIELDS] = /* Define field information */ {"Name", "Latitude", "Longitude", "Pressure", "Temperature"}; diff --git a/hl/examples/ex_table_05.c b/hl/examples/ex_table_05.c index 9a689e32621..d7cecaf6959 100644 --- a/hl/examples/ex_table_05.c +++ b/hl/examples/ex_table_05.c @@ -50,7 +50,7 @@ main(void) size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi), HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)}; size_t dst_sizes[NFIELDS] = {sizeof(dst_buf[0].name), sizeof(dst_buf[0].lati), sizeof(dst_buf[0].longi), - sizeof(dst_buf[0].pressure), sizeof(dst_buf[0].temperature)}; + sizeof(dst_buf[0].pressure), sizeof(dst_buf[0].temperature)}; size_t field_offset_pos[2] = {HOFFSET(Position, lati), HOFFSET(Position, longi)}; diff --git a/hl/examples/ex_table_08.c b/hl/examples/ex_table_08.c index 3d67b16ed3e..d66a1b9e4d1 100644 --- a/hl/examples/ex_table_08.c +++ b/hl/examples/ex_table_08.c @@ -50,7 +50,7 @@ main(void) size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi), HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)}; size_t dst_sizes[NFIELDS] = {sizeof(p_data[0].name), sizeof(p_data[0].lati), sizeof(p_data[0].longi), - sizeof(p_data[0].pressure), sizeof(p_data[0].temperature)}; + sizeof(p_data[0].pressure), sizeof(p_data[0].temperature)}; /* Define an array of Particles to insert */ Particle p_data_insert[NRECORDS_INS] = {{"new", 30, 30, 3.0F, 30.0}, {"new", 40, 40, 4.0F, 40.0}}; diff --git a/hl/examples/ex_table_09.c b/hl/examples/ex_table_09.c index 37042951f34..ba515ee188a 100644 --- a/hl/examples/ex_table_09.c +++ b/hl/examples/ex_table_09.c @@ -45,7 +45,7 @@ main(void) size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi), HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)}; size_t dst_sizes[NFIELDS] = {sizeof(dst_buf[0].name), sizeof(dst_buf[0].lati), sizeof(dst_buf[0].longi), - sizeof(dst_buf[0].pressure), sizeof(dst_buf[0].temperature)}; + sizeof(dst_buf[0].pressure), sizeof(dst_buf[0].temperature)}; /* Define an array of Particles */ Particle p_data[NRECORDS] = {{"zero", 0, 0, 0.0F, 0.0}, {"one", 10, 10, 1.0F, 10.0}, diff --git a/hl/examples/ex_table_10.c b/hl/examples/ex_table_10.c index ad3f2e15589..d462f7f020f 100644 --- a/hl/examples/ex_table_10.c +++ b/hl/examples/ex_table_10.c @@ -50,7 +50,7 @@ main(void) size_t dst_offset[NFIELDS] = {HOFFSET(Particle, name), HOFFSET(Particle, lati), HOFFSET(Particle, longi), HOFFSET(Particle, pressure), HOFFSET(Particle, temperature)}; size_t dst_sizes[NFIELDS] = {sizeof(dst_buf[0].name), sizeof(dst_buf[0].lati), sizeof(dst_buf[0].longi), - sizeof(dst_buf[0].pressure), sizeof(dst_buf[0].temperature)}; + sizeof(dst_buf[0].pressure), sizeof(dst_buf[0].temperature)}; /* Define field information */ const char *field_names[NFIELDS] = {"Name", "Latitude", "Longitude", "Pressure", "Temperature"}; diff --git a/hl/test/gen_test_ds.c b/hl/test/gen_test_ds.c index 438a35aab75..525f44a046b 100644 --- a/hl/test/gen_test_ds.c +++ b/hl/test/gen_test_ds.c @@ -136,9 +136,9 @@ create_long_dataset(hid_t fid, const char *name, const char *dsidx) int rankds = 1; hsize_t dims[4] = {DIM1_SIZE, DIM2_SIZE, DIM3_SIZE, DIM4_SIZE}; long buf[DIM_DATA * 3 * 2] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; + 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; hsize_t s1_dim[1] = {DIM1_SIZE}; hsize_t s2_dim[1] = {DIM2_SIZE}; hsize_t s3_dim[1] = {DIM3_SIZE}; diff --git a/hl/test/test_table.c b/hl/test/test_table.c index 8996fa46480..4aa359fedcd 100644 --- a/hl/test/test_table.c +++ b/hl/test/test_table.c @@ -236,13 +236,13 @@ test_table(hid_t fid, int do_write) 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}}; + {"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}}; /* 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}; float pressure_out[NRECORDS]; @@ -302,8 +302,8 @@ test_table(hid_t fid, int do_write) HOFFSET(particle2_t, pressure), HOFFSET(particle2_t, temperature), HOFFSET(particle2_t, lati), HOFFSET(particle2_t, new_field)}; size_t dst_sizes2[NFIELDS + 1] = {sizeof(rbuf2[0].name), sizeof(rbuf2[0].longi), - sizeof(rbuf2[0].pressure), sizeof(rbuf2[0].temperature), - sizeof(rbuf2[0].lati), sizeof(rbuf2[0].new_field)}; + sizeof(rbuf2[0].pressure), sizeof(rbuf2[0].temperature), + sizeof(rbuf2[0].lati), sizeof(rbuf2[0].new_field)}; /*------------------------------------------------------------------------- * initialize table parameters * size and the offsets of struct members in memory @@ -353,7 +353,7 @@ test_table(hid_t fid, int do_write) HOFFSET(particle_t, pressure), HOFFSET(particle_t, temperature), HOFFSET(particle_t, lati)}; size_t field_size[NFIELDS] = {sizeof(rbuf[0].name), sizeof(rbuf[0].longi), sizeof(rbuf[0].pressure), - sizeof(rbuf[0].temperature), sizeof(rbuf[0].lati)}; + sizeof(rbuf[0].temperature), sizeof(rbuf[0].lati)}; const char *field_names4[NFIELDS + 1] = {"F1", "F2", "F3", "F4", "F5", "F6"}; hid_t field_type4[NFIELDS + 1]; diff --git a/java/test/TestAll.java b/java/test/TestAll.java index c22fbfe2ca8..5f3b14c3e01 100644 --- a/java/test/TestAll.java +++ b/java/test/TestAll.java @@ -28,5 +28,4 @@ TestH5Obasic.class, TestH5Ocopy.class, TestH5Ocreate.class, TestH5PL.class, TestH5Z.class}) -public class TestAll { -} +public class TestAll {} diff --git a/java/test/TestH5D.java b/java/test/TestH5D.java index eacaabf82eb..db2a0428db7 100644 --- a/java/test/TestH5D.java +++ b/java/test/TestH5D.java @@ -939,8 +939,8 @@ public int callback(byte[] elem_buf, long elem_id, int ndim, long[] point, H5D_i public void testH5Dvlen_get_buf_size() { String[] str_data = {"Parting", "is such", "sweet", "sorrow.", "Testing", "one", "two", "three.", - "Dog,", "man's", "best", "friend.", "Diamonds", "are", "a", "girls!", - "S A", "T U R", "D A Y", "night", "That's", "all", "folks", "!!!"}; + "Dog,", "man's", "best", "friend.", "Diamonds", "are", "a", "girls!", + "S A", "T U R", "D A Y", "night", "That's", "all", "folks", "!!!"}; long vl_size = -1; /* Number of bytes used */ long str_data_bytes = 0; for (int idx = 0; idx < str_data.length; idx++) diff --git a/java/test/TestH5F.java b/java/test/TestH5F.java index fde27398a73..5ae8f7e0c0e 100644 --- a/java/test/TestH5F.java +++ b/java/test/TestH5F.java @@ -45,8 +45,8 @@ public class TestH5F { private static final int[] OBJ_COUNTS = {COUNT_OBJ_FILE, COUNT_OBJ_DATASET, COUNT_OBJ_GROUP, COUNT_OBJ_DATATYPE, COUNT_OBJ_ATTR, COUNT_OBJ_ALL}; private static final int[] OBJ_TYPES = {HDF5Constants.H5F_OBJ_FILE, HDF5Constants.H5F_OBJ_DATASET, - HDF5Constants.H5F_OBJ_GROUP, HDF5Constants.H5F_OBJ_DATATYPE, - HDF5Constants.H5F_OBJ_ATTR, HDF5Constants.H5F_OBJ_ALL}; + HDF5Constants.H5F_OBJ_GROUP, HDF5Constants.H5F_OBJ_DATATYPE, + HDF5Constants.H5F_OBJ_ATTR, HDF5Constants.H5F_OBJ_ALL}; long H5fid = HDF5Constants.H5I_INVALID_HID; private final void _deleteFile(String filename) diff --git a/java/test/TestH5G.java b/java/test/TestH5G.java index 1f6da3120ae..65fadde95c3 100644 --- a/java/test/TestH5G.java +++ b/java/test/TestH5G.java @@ -37,7 +37,7 @@ public class TestH5G { private static final String H5_FILE = "testG.h5"; private static final String H5_FILE2 = "testG2.h5"; private static final String[] GROUPS = {"/G1", "/G1/G11", "/G1/G12", "/G1/G11/G111", - "/G1/G11/G112", "/G1/G11/G113", "/G1/G11/G114"}; + "/G1/G11/G112", "/G1/G11/G113", "/G1/G11/G114"}; private static final String[] GROUPS2 = {"/G1", "/G1/G14", "/G1/G12", "/G1/G13", "/G1/G11"}; long H5fid = HDF5Constants.H5I_INVALID_HID; long H5fid2 = HDF5Constants.H5I_INVALID_HID; diff --git a/java/test/TestH5Plist.java b/java/test/TestH5Plist.java index d8a429b6418..c2a9862eb8e 100644 --- a/java/test/TestH5Plist.java +++ b/java/test/TestH5Plist.java @@ -73,7 +73,7 @@ public class TestH5Plist { private static final String PROP3_NAME = "Property 3"; private static final char[] prop3_def = {'T', 'e', 'n', ' ', 'c', - 'h', 'a', 'r', 's', ' '}; // Property 3 default value + 'h', 'a', 'r', 's', ' '}; // Property 3 default value private static final int PROP3_SIZE = 10; private static final String PROP4_NAME = "Property 4"; diff --git a/src/H5Apublic.h b/src/H5Apublic.h index 7c28c0a24a2..97d3a204cc2 100644 --- a/src/H5Apublic.h +++ b/src/H5Apublic.h @@ -153,8 +153,8 @@ H5_DLL hid_t H5Acreate_async(const char *app_file, const char *app_func, unsigne const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t es_id); #else -H5_DLL hid_t H5Acreate_async(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, - hid_t acpl_id, hid_t aapl_id, hid_t es_id); +H5_DLL hid_t H5Acreate_async(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, + hid_t acpl_id, hid_t aapl_id, hid_t es_id); #endif /*--------------------------------------------------------------------------*/ @@ -769,7 +769,7 @@ H5_DLL hid_t H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id); H5_DLL hid_t H5Aopen_async(const char *app_file, const char *app_func, unsigned app_line, hid_t obj_id, const char *attr_name, hid_t aapl_id, hid_t es_id); #else -H5_DLL hid_t H5Aopen_async(hid_t obj_id, const char *attr_name, hid_t aapl_id, hid_t es_id); +H5_DLL hid_t H5Aopen_async(hid_t obj_id, const char *attr_name, hid_t aapl_id, hid_t es_id); #endif /*--------------------------------------------------------------------------*/ /** @@ -824,9 +824,9 @@ H5_DLL hid_t H5Aopen_by_idx_async(const char *app_file, const char *app_func, un const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t aapl_id, hid_t lapl_id, hid_t es_id); #else -H5_DLL hid_t H5Aopen_by_idx_async(hid_t loc_id, const char *obj_name, H5_index_t idx_type, - H5_iter_order_t order, hsize_t n, hid_t aapl_id, hid_t lapl_id, - hid_t es_id); +H5_DLL hid_t H5Aopen_by_idx_async(hid_t loc_id, const char *obj_name, H5_index_t idx_type, + H5_iter_order_t order, hsize_t n, hid_t aapl_id, hid_t lapl_id, + hid_t es_id); #endif /*--------------------------------------------------------------------------*/ /** @@ -879,8 +879,8 @@ H5_DLL hid_t H5Aopen_by_name_async(const char *app_file, const char *app_func, u hid_t loc_id, const char *obj_name, const char *attr_name, hid_t aapl_id, hid_t lapl_id, hid_t es_id); #else -H5_DLL hid_t H5Aopen_by_name_async(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t aapl_id, - hid_t lapl_id, hid_t es_id); +H5_DLL hid_t H5Aopen_by_name_async(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t aapl_id, + hid_t lapl_id, hid_t es_id); #endif /*-------------------------------------------------------------------------- */ diff --git a/src/H5B2private.h b/src/H5B2private.h index bf06a8bd846..fbb1e7e2e10 100644 --- a/src/H5B2private.h +++ b/src/H5B2private.h @@ -86,7 +86,7 @@ struct H5B2_class_t { size_t nrec_size; /* Size of native (memory) record */ /* Extensible array client callback methods */ - void *(*crt_context)(void *udata); /* Create context for other client callbacks */ + void *(*crt_context)(void *udata); /* Create context for other client callbacks */ herr_t (*dst_context)(void *ctx); /* Destroy client callback context */ herr_t (*store)(void *nrecord, const void *udata); /* Store application record in native record table */ herr_t (*compare)(const void *rec1, const void *rec2, int *result); /* Compare two native records */ diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h index f354dea2ac0..9cd5da11d73 100644 --- a/src/H5Bprivate.h +++ b/src/H5Bprivate.h @@ -90,13 +90,13 @@ typedef struct H5B_shared_t { * array is initialized with the HDF5_BTREE_K_DEFAULT macro. */ typedef struct H5B_class_t { - H5B_subid_t id; /*id as found in file*/ - size_t sizeof_nkey; /*size of native (memory) key*/ - H5UC_t *(*get_shared)(const H5F_t *, const void *); /*shared info for node */ - herr_t (*new_node)(H5F_t *, H5B_ins_t, void *, void *, void *, haddr_t *); - int (*cmp2)(void *, void *, void *); /*compare 2 keys */ - int (*cmp3)(void *, void *, void *); /*compare 3 keys */ - htri_t (*found)(H5F_t *, haddr_t, const void *, bool *, void *); + H5B_subid_t id; /*id as found in file*/ + size_t sizeof_nkey; /*size of native (memory) key*/ + H5UC_t *(*get_shared)(const H5F_t *, const void *); /*shared info for node */ + herr_t (*new_node)(H5F_t *, H5B_ins_t, void *, void *, void *, haddr_t *); + int (*cmp2)(void *, void *, void *); /*compare 2 keys */ + int (*cmp3)(void *, void *, void *); /*compare 3 keys */ + htri_t (*found)(H5F_t *, haddr_t, const void *, bool *, void *); /* insert new data */ H5B_ins_t (*insert)(H5F_t *, haddr_t, void *, bool *, void *, void *, void *, bool *, haddr_t *); diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c index 978b1709945..55bfcd28600 100644 --- a/src/H5Cdbg.c +++ b/src/H5Cdbg.c @@ -675,7 +675,7 @@ void H5C_stats__reset(H5C_t *cache_ptr) #else /* NDEBUG */ #if H5C_COLLECT_CACHE_STATS -H5C_stats__reset(H5C_t *cache_ptr) +H5C_stats__reset(H5C_t *cache_ptr) #else /* H5C_COLLECT_CACHE_STATS */ H5C_stats__reset(H5C_t H5_ATTR_UNUSED *cache_ptr) #endif /* H5C_COLLECT_CACHE_STATS */ diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index 6a636aee76c..b8d579a6df0 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -593,7 +593,7 @@ ***********************************************************************/ #define H5C__HASH_MASK ((size_t)(H5C__HASH_TABLE_LEN - 1) << 3) -#define H5C__HASH_FCN(x) (int)((unsigned)((x)&H5C__HASH_MASK) >> 3) +#define H5C__HASH_FCN(x) (int)((unsigned)((x) & H5C__HASH_MASK) >> 3) #define H5C__POST_HT_SHIFT_TO_FRONT_SC_CMP(cache_ptr, entry_ptr, k) \ ((cache_ptr) == NULL || (cache_ptr)->index[k] != (entry_ptr) || (entry_ptr)->ht_prev != NULL) diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index d7065799a67..c1af01cd35c 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -860,7 +860,7 @@ typedef herr_t (*H5C_get_initial_load_size_func_t)(void *udata_ptr, size_t *imag typedef herr_t (*H5C_get_final_load_size_func_t)(const void *image_ptr, size_t image_len, void *udata_ptr, size_t *actual_len_ptr); typedef htri_t (*H5C_verify_chksum_func_t)(const void *image_ptr, size_t len, void *udata_ptr); -typedef void *(*H5C_deserialize_func_t)(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr); +typedef void *(*H5C_deserialize_func_t)(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr); typedef herr_t (*H5C_image_len_func_t)(const void *thing, size_t *image_len_ptr); typedef herr_t (*H5C_pre_serialize_func_t)(H5F_t *f, void *thing, haddr_t addr, size_t len, haddr_t *new_addr_ptr, size_t *new_len_ptr, unsigned *flags_ptr); diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 6419a52700b..d232024a3f0 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -245,7 +245,7 @@ typedef struct H5D_chunk_coll_fill_info_t { haddr_t addr; /* File address of the chunk */ size_t chunk_size; /* Size of the chunk in the file */ bool unfiltered_partial_chunk; - } * chunk_info; + } *chunk_info; } H5D_chunk_coll_fill_info_t; #endif /* H5_HAVE_PARALLEL */ diff --git a/src/H5Defl.c b/src/H5Defl.c index 34d48e690b7..42678761a00 100644 --- a/src/H5Defl.c +++ b/src/H5Defl.c @@ -323,7 +323,7 @@ H5D__efl_read(const H5O_efl_t *efl, const H5D_t *dset, haddr_t addr, size_t size H5_CHECK_OVERFLOW(tempto_read, hsize_t, size_t); to_read = (size_t)tempto_read; #else /* NDEBUG */ - to_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size); + to_read = MIN((size_t)(efl->slot[u].size - skip), (hsize_t)size); #endif /* NDEBUG */ /* Inner loop - read to_read bytes from a single external file */ diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index c6c50c2eef3..8bd159d7a2b 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -140,17 +140,17 @@ struct H5D_dset_io_info_t; typedef struct H5D_shared_t H5D_shared_t; /* Function pointers for I/O on particular types of dataset layouts */ -typedef herr_t (*H5D_layout_construct_func_t)(H5F_t *f, H5D_t *dset); -typedef herr_t (*H5D_layout_init_func_t)(H5F_t *f, const H5D_t *dset, hid_t dapl_id); -typedef bool (*H5D_layout_is_space_alloc_func_t)(const H5O_storage_t *storage); -typedef bool (*H5D_layout_is_data_cached_func_t)(const H5D_shared_t *shared_dset); -typedef herr_t (*H5D_layout_io_init_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *dinfo); -typedef herr_t (*H5D_layout_mdio_init_func_t)(struct H5D_io_info_t *io_info, +typedef herr_t (*H5D_layout_construct_func_t)(H5F_t *f, H5D_t *dset); +typedef herr_t (*H5D_layout_init_func_t)(H5F_t *f, const H5D_t *dset, hid_t dapl_id); +typedef bool (*H5D_layout_is_space_alloc_func_t)(const H5O_storage_t *storage); +typedef bool (*H5D_layout_is_data_cached_func_t)(const H5D_shared_t *shared_dset); +typedef herr_t (*H5D_layout_io_init_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *dinfo); +typedef herr_t (*H5D_layout_mdio_init_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *dinfo); -typedef herr_t (*H5D_layout_read_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *dinfo); -typedef herr_t (*H5D_layout_write_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *dinfo); -typedef herr_t (*H5D_layout_read_md_func_t)(struct H5D_io_info_t *io_info); -typedef herr_t (*H5D_layout_write_md_func_t)(struct H5D_io_info_t *io_info); +typedef herr_t (*H5D_layout_read_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *dinfo); +typedef herr_t (*H5D_layout_write_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *dinfo); +typedef herr_t (*H5D_layout_read_md_func_t)(struct H5D_io_info_t *io_info); +typedef herr_t (*H5D_layout_write_md_func_t)(struct H5D_io_info_t *io_info); typedef ssize_t (*H5D_layout_readvv_func_t)(const struct H5D_io_info_t *io_info, const struct H5D_dset_io_info_t *dset_info, size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], @@ -163,9 +163,9 @@ typedef ssize_t (*H5D_layout_writevv_func_t)(const struct H5D_io_info_t *io hsize_t dset_offset_arr[], size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]); -typedef herr_t (*H5D_layout_flush_func_t)(H5D_t *dataset); -typedef herr_t (*H5D_layout_io_term_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *di); -typedef herr_t (*H5D_layout_dest_func_t)(H5D_t *dataset); +typedef herr_t (*H5D_layout_flush_func_t)(H5D_t *dataset); +typedef herr_t (*H5D_layout_io_term_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *di); +typedef herr_t (*H5D_layout_dest_func_t)(H5D_t *dataset); /* Typedef for grouping layout I/O routines */ typedef struct H5D_layout_ops_t { @@ -396,13 +396,13 @@ typedef herr_t (*H5D_chunk_create_func_t)(const H5D_chk_idx_info_t *idx_info); typedef herr_t (*H5D_chunk_open_func_t)(const H5D_chk_idx_info_t *idx_info); typedef herr_t (*H5D_chunk_close_func_t)(const H5D_chk_idx_info_t *idx_info); typedef herr_t (*H5D_chunk_is_open_func_t)(const H5D_chk_idx_info_t *idx_info, bool *is_open); -typedef bool (*H5D_chunk_is_space_alloc_func_t)(const H5O_storage_chunk_t *storage); +typedef bool (*H5D_chunk_is_space_alloc_func_t)(const H5O_storage_chunk_t *storage); typedef herr_t (*H5D_chunk_insert_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata, const H5D_t *dset); typedef herr_t (*H5D_chunk_get_addr_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata); typedef herr_t (*H5D_chunk_load_metadata_func_t)(const H5D_chk_idx_info_t *idx_info); typedef herr_t (*H5D_chunk_resize_func_t)(H5O_layout_chunk_t *layout); -typedef int (*H5D_chunk_iterate_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb, +typedef int (*H5D_chunk_iterate_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb, void *chunk_udata); typedef herr_t (*H5D_chunk_remove_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata); typedef herr_t (*H5D_chunk_delete_func_t)(const H5D_chk_idx_info_t *idx_info); diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index 8692acdeff8..fbe60f03735 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -332,8 +332,8 @@ H5_DLL hid_t H5Dcreate_async(const char *app_file, const char *app_func, unsigne const char *name, hid_t type_id, hid_t space_id, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id, hid_t es_id); #else -H5_DLL hid_t H5Dcreate_async(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t lcpl_id, - hid_t dcpl_id, hid_t dapl_id, hid_t es_id); +H5_DLL hid_t H5Dcreate_async(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t lcpl_id, + hid_t dcpl_id, hid_t dapl_id, hid_t es_id); #endif /** @@ -414,7 +414,7 @@ H5_DLL hid_t H5Dopen2(hid_t loc_id, const char *name, hid_t dapl_id); H5_DLL hid_t H5Dopen_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id, const char *name, hid_t dapl_id, hid_t es_id); #else -H5_DLL hid_t H5Dopen_async(hid_t loc_id, const char *name, hid_t dapl_id, hid_t es_id); +H5_DLL hid_t H5Dopen_async(hid_t loc_id, const char *name, hid_t dapl_id, hid_t es_id); #endif /** @@ -454,7 +454,7 @@ H5_DLL hid_t H5Dget_space(hid_t dset_id); H5_DLL hid_t H5Dget_space_async(const char *app_file, const char *app_func, unsigned app_line, hid_t dset_id, hid_t es_id); #else -H5_DLL hid_t H5Dget_space_async(hid_t dset_id, hid_t es_id); +H5_DLL hid_t H5Dget_space_async(hid_t dset_id, hid_t es_id); #endif /** diff --git a/src/H5EApkg.h b/src/H5EApkg.h index 3dd2a2da516..704e1587b06 100644 --- a/src/H5EApkg.h +++ b/src/H5EApkg.h @@ -364,7 +364,7 @@ typedef struct H5EA_dblk_page_cache_ud_t { #ifdef H5EA_TESTING typedef struct H5EA__ctx_cb_t { herr_t (*encode)(const void *elmt, size_t nelmts, void *udata); /* Perform action during encode step */ - void *udata; /* User data for encode action */ + void *udata; /* User data for encode action */ } H5EA__ctx_cb_t; #endif /* H5EA_TESTING */ diff --git a/src/H5EAprivate.h b/src/H5EAprivate.h index 2780cb199d3..5a3eb3ba9ad 100644 --- a/src/H5EAprivate.h +++ b/src/H5EAprivate.h @@ -56,8 +56,8 @@ typedef struct H5EA_class_t { size_t nat_elmt_size; /* Size of native (memory) element */ /* Extensible array client callback methods */ - void *(*crt_context)(void *udata); /* Create context for other callbacks */ - herr_t (*dst_context)(void *ctx); /* Destroy context */ + void *(*crt_context)(void *udata); /* Create context for other callbacks */ + herr_t (*dst_context)(void *ctx); /* Destroy context */ herr_t (*fill)(void *nat_blk, size_t nelmts); /* Fill array of elements with encoded form of "missing element" value */ herr_t (*encode)(void *raw, const void *elmt, size_t nelmts, @@ -65,9 +65,9 @@ typedef struct H5EA_class_t { herr_t (*decode)(const void *raw, void *elmt, size_t nelmts, void *ctx); /* Decode elements from disk storage form to native form */ herr_t (*debug)(FILE *stream, int indent, int fwidth, hsize_t idx, - const void *elmt); /* Print an element for debugging */ - void *(*crt_dbg_ctx)(H5F_t *f, haddr_t obj_addr); /* Create debugging context */ - herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */ + const void *elmt); /* Print an element for debugging */ + void *(*crt_dbg_ctx)(H5F_t *f, haddr_t obj_addr); /* Create debugging context */ + herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */ } H5EA_class_t; /* Extensible array creation parameters */ diff --git a/src/H5FAprivate.h b/src/H5FAprivate.h index 9bdc0742c75..e0aa2d38b84 100644 --- a/src/H5FAprivate.h +++ b/src/H5FAprivate.h @@ -56,8 +56,8 @@ typedef struct H5FA_class_t { size_t nat_elmt_size; /* Size of native (memory) element */ /* Fixed array client callback methods */ - void *(*crt_context)(void *udata); /* Create context for other callbacks */ - herr_t (*dst_context)(void *ctx); /* Destroy context */ + void *(*crt_context)(void *udata); /* Create context for other callbacks */ + herr_t (*dst_context)(void *ctx); /* Destroy context */ herr_t (*fill)(void *nat_blk, size_t nelmts); /* Fill array of elements with encoded form of "missing element" value */ herr_t (*encode)(void *raw, const void *elmt, size_t nelmts, @@ -65,9 +65,9 @@ typedef struct H5FA_class_t { herr_t (*decode)(const void *raw, void *elmt, size_t nelmts, void *ctx); /* Decode elements from disk storage form to native form */ herr_t (*debug)(FILE *stream, int indent, int fwidth, hsize_t idx, - const void *elmt); /* Print an element for debugging */ - void *(*crt_dbg_ctx)(H5F_t *f, haddr_t obj_addr); /* Create debugging context */ - herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */ + const void *elmt); /* Print an element for debugging */ + void *(*crt_dbg_ctx)(H5F_t *f, haddr_t obj_addr); /* Create debugging context */ + herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */ } H5FA_class_t; /* Fixed array creation parameters */ diff --git a/src/H5FDdevelop.h b/src/H5FDdevelop.h index 5f1be973d64..c1183ace2b8 100644 --- a/src/H5FDdevelop.h +++ b/src/H5FDdevelop.h @@ -217,7 +217,7 @@ typedef struct H5FD_class_t { /**< Decodes the superblock information for this driver */ size_t fapl_size; /**< Size of driver-specific file access properties */ - void *(*fapl_get)(H5FD_t *file); + void *(*fapl_get)(H5FD_t *file); /**< Returns the file access property list */ void *(*fapl_copy)(const void *fapl); diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c index 7f7a2950ae3..25fe7cba95a 100644 --- a/src/H5FDhdfs.c +++ b/src/H5FDhdfs.c @@ -73,7 +73,7 @@ static hid_t H5FD_HDFS_g = 0; unsigned long long donotshadowresult = 1; \ unsigned donotshadowindex = 0; \ for (donotshadowindex = 0; \ - donotshadowindex < (((bin_i)*HDFS_STATS_INTERVAL) + HDFS_STATS_START_POWER); \ + donotshadowindex < (((bin_i) * HDFS_STATS_INTERVAL) + HDFS_STATS_START_POWER); \ donotshadowindex++) { \ donotshadowresult *= HDFS_STATS_BASE; \ } \ diff --git a/src/H5FDlog.c b/src/H5FDlog.c index e8131726fef..8c02415ce08 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -1225,7 +1225,7 @@ H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had if (bytes_read > 0) offset += bytes_read; #else - bytes_read = HDread(file->fd, buf, bytes_in); + bytes_read = HDread(file->fd, buf, bytes_in); #endif /* H5_HAVE_PREADWRITE */ } while (-1 == bytes_read && EINTR == errno); diff --git a/src/H5FDmirror.c b/src/H5FDmirror.c index d5b9c08186d..bde3647f652 100644 --- a/src/H5FDmirror.c +++ b/src/H5FDmirror.c @@ -65,10 +65,10 @@ typedef struct H5FD_mirror_t { #ifndef BSWAP_64 #define BSWAP_64(X) \ - (uint64_t)((((X)&0x00000000000000FF) << 56) | (((X)&0x000000000000FF00) << 40) | \ - (((X)&0x0000000000FF0000) << 24) | (((X)&0x00000000FF000000) << 8) | \ - (((X)&0x000000FF00000000) >> 8) | (((X)&0x0000FF0000000000) >> 24) | \ - (((X)&0x00FF000000000000) >> 40) | (((X)&0xFF00000000000000) >> 56)) + (uint64_t)((((X) & 0x00000000000000FF) << 56) | (((X) & 0x000000000000FF00) << 40) | \ + (((X) & 0x0000000000FF0000) << 24) | (((X) & 0x00000000FF000000) << 8) | \ + (((X) & 0x000000FF00000000) >> 8) | (((X) & 0x0000FF0000000000) >> 24) | \ + (((X) & 0x00FF000000000000) >> 40) | (((X) & 0xFF00000000000000) >> 56)) #endif /* BSWAP_64 */ /* Debugging flabs for verbose tracing -- nonzero to enable */ diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 99ff8df6cfe..ed4093adf74 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -692,7 +692,7 @@ H5FD__sec2_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU if (bytes_read > 0) offset += bytes_read; #else - bytes_read = HDread(file->fd, buf, bytes_in); + bytes_read = HDread(file->fd, buf, bytes_in); #endif /* H5_HAVE_PREADWRITE */ } while (-1 == bytes_read && EINTR == errno); diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 00971e44bfb..b53dd3dc1ad 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -113,7 +113,7 @@ typedef struct H5FD_stdio_t { DWORD nFileIndexHigh; DWORD dwVolumeSerialNumber; - HANDLE hFile; /* Native windows file handle */ + HANDLE hFile; /* Native windows file handle */ #endif /* H5_HAVE_WIN32_API */ } H5FD_stdio_t; diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h index f917a253944..035d88f9ee6 100644 --- a/src/H5FSprivate.h +++ b/src/H5FSprivate.h @@ -105,9 +105,9 @@ typedef struct H5FS_section_class_t { herr_t (*term_cls)(struct H5FS_section_class_t *); /* Routine to terminate class-specific settings */ /* Object methods */ - herr_t (*add)(H5FS_section_info_t **, unsigned *, + herr_t (*add)(H5FS_section_info_t **, unsigned *, void *); /* Routine called when section is about to be added to manager */ - herr_t (*serialize)(const struct H5FS_section_class_t *, const H5FS_section_info_t *, + herr_t (*serialize)(const struct H5FS_section_class_t *, const H5FS_section_info_t *, uint8_t *); /* Routine to serialize a "live" section into a buffer */ H5FS_section_info_t *(*deserialize)( const struct H5FS_section_class_t *, const uint8_t *, haddr_t, hsize_t, @@ -122,7 +122,7 @@ typedef struct H5FS_section_class_t { herr_t (*valid)(const struct H5FS_section_class_t *, const H5FS_section_info_t *); /* Routine to check if a section is valid */ H5FS_section_info_t *(*split)(H5FS_section_info_t *, hsize_t); /* Routine to create the split section */ - herr_t (*debug)(const H5FS_section_info_t *, FILE *, int, + herr_t (*debug)(const H5FS_section_info_t *, FILE *, int, int); /* Routine to dump debugging information about a section */ } H5FS_section_class_t; diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h index 38880e787b7..d3dd64e7a7b 100644 --- a/src/H5Gpublic.h +++ b/src/H5Gpublic.h @@ -127,8 +127,8 @@ H5_DLL hid_t H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcp H5_DLL hid_t H5Gcreate_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t es_id); #else -H5_DLL hid_t H5Gcreate_async(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, - hid_t es_id); +H5_DLL hid_t H5Gcreate_async(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, + hid_t es_id); #endif /** @@ -222,7 +222,7 @@ H5_DLL hid_t H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id); H5_DLL hid_t H5Gopen_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id, const char *name, hid_t gapl_id, hid_t es_id); #else -H5_DLL hid_t H5Gopen_async(hid_t loc_id, const char *name, hid_t gapl_id, hid_t es_id); +H5_DLL hid_t H5Gopen_async(hid_t loc_id, const char *name, hid_t gapl_id, hid_t es_id); #endif /** diff --git a/src/H5Iint.c b/src/H5Iint.c index 709b9450802..57a6d9f708f 100644 --- a/src/H5Iint.c +++ b/src/H5Iint.c @@ -36,7 +36,7 @@ /****************/ /* Combine a Type number and an ID index into an ID */ -#define H5I_MAKE(g, i) ((((hid_t)(g)&TYPE_MASK) << ID_BITS) | ((hid_t)(i)&ID_MASK)) +#define H5I_MAKE(g, i) ((((hid_t)(g) & TYPE_MASK) << ID_BITS) | ((hid_t)(i) & ID_MASK)) /******************/ /* Local Typedefs */ diff --git a/src/H5Mpublic.h b/src/H5Mpublic.h index 3d8a8c7f7c8..f2d45720bfe 100644 --- a/src/H5Mpublic.h +++ b/src/H5Mpublic.h @@ -238,8 +238,8 @@ H5_DLL hid_t H5Mcreate_async(const char *app_file, const char *app_func, unsigne const char *name, hid_t key_type_id, hid_t val_type_id, hid_t lcpl_id, hid_t mcpl_id, hid_t mapl_id, hid_t es_id); #else -H5_DLL hid_t H5Mcreate_async(hid_t loc_id, const char *name, hid_t key_type_id, hid_t val_type_id, - hid_t lcpl_id, hid_t mcpl_id, hid_t mapl_id, hid_t es_id); +H5_DLL hid_t H5Mcreate_async(hid_t loc_id, const char *name, hid_t key_type_id, hid_t val_type_id, + hid_t lcpl_id, hid_t mcpl_id, hid_t mapl_id, hid_t es_id); #endif /** @@ -300,7 +300,7 @@ H5_DLL hid_t H5Mopen(hid_t loc_id, const char *name, hid_t mapl_id); H5_DLL hid_t H5Mopen_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id, const char *name, hid_t mapl_id, hid_t es_id); #else -H5_DLL hid_t H5Mopen_async(hid_t loc_id, const char *name, hid_t mapl_id, hid_t es_id); +H5_DLL hid_t H5Mopen_async(hid_t loc_id, const char *name, hid_t mapl_id, hid_t es_id); #endif /** diff --git a/src/H5Odtype.c b/src/H5Odtype.c index b2e6c8f65be..a359575a646 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -67,13 +67,13 @@ static herr_t H5O__dtype_debug(H5F_t *f, const void *_mesg, FILE *stream, int in /* If the version is too low, give an error. No error if nochange is set * because in that case we are either debugging or deleting the object header */ #define H5O_DTYPE_CHECK_VERSION(DT, VERS, MIN_VERS, IOF, CLASS, ERR) \ - if (((VERS) < (MIN_VERS)) && !(*(IOF)&H5O_DECODEIO_NOCHANGE)) \ + if (((VERS) < (MIN_VERS)) && !(*(IOF) & H5O_DECODEIO_NOCHANGE)) \ HGOTO_ERROR(H5E_DATATYPE, H5E_VERSION, ERR, "incorrect " CLASS " datatype version"); #else /* H5_STRICT_FORMAT_CHECKS */ /* If the version is too low and we are allowed to change the message, upgrade * it and mark the object header as dirty */ #define H5O_DTYPE_CHECK_VERSION(DT, VERS, MIN_VERS, IOF, CLASS, ERR) \ - if (((VERS) < (MIN_VERS)) && !(*(IOF)&H5O_DECODEIO_NOCHANGE)) { \ + if (((VERS) < (MIN_VERS)) && !(*(IOF) & H5O_DECODEIO_NOCHANGE)) { \ (VERS) = (MIN_VERS); \ if (H5T__upgrade_version((DT), (VERS)) < 0) \ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade " CLASS " encoding version"); \ diff --git a/src/H5Opkg.h b/src/H5Opkg.h index d4cab42471d..f497e309000 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -212,25 +212,25 @@ struct H5O_msg_class_t { const char *name; /*for debugging */ size_t native_size; /*size of native message */ unsigned share_flags; /* Message sharing settings */ - void *(*decode)(H5F_t *, H5O_t *, unsigned, unsigned *, size_t, const uint8_t *); - herr_t (*encode)(H5F_t *, bool, size_t, uint8_t *, const void *); - void *(*copy)(const void *, void *); /*copy native value */ - size_t (*raw_size)(const H5F_t *, bool, const void *); /*sizeof encoded message */ - herr_t (*reset)(void *); /*free nested data structs */ - herr_t (*free)(void *); /*free main data struct */ - herr_t (*del)(H5F_t *, H5O_t *, void *); /* Delete space in file referenced by this message */ - herr_t (*link)(H5F_t *, H5O_t *, void *); /* Increment any links in file reference by this message */ - herr_t (*set_share)(void *, const H5O_shared_t *); /* Set shared information */ - htri_t (*can_share)(const void *); /* Is message allowed to be shared? */ - herr_t (*pre_copy_file)(H5F_t *, const void *, bool *, const H5O_copy_t *, + void *(*decode)(H5F_t *, H5O_t *, unsigned, unsigned *, size_t, const uint8_t *); + herr_t (*encode)(H5F_t *, bool, size_t, uint8_t *, const void *); + void *(*copy)(const void *, void *); /*copy native value */ + size_t (*raw_size)(const H5F_t *, bool, const void *); /*sizeof encoded message */ + herr_t (*reset)(void *); /*free nested data structs */ + herr_t (*free)(void *); /*free main data struct */ + herr_t (*del)(H5F_t *, H5O_t *, void *); /* Delete space in file referenced by this message */ + herr_t (*link)(H5F_t *, H5O_t *, void *); /* Increment any links in file reference by this message */ + herr_t (*set_share)(void *, const H5O_shared_t *); /* Set shared information */ + htri_t (*can_share)(const void *); /* Is message allowed to be shared? */ + herr_t (*pre_copy_file)(H5F_t *, const void *, bool *, const H5O_copy_t *, void *); /*"pre copy" action when copying native value to file */ - void *(*copy_file)(H5F_t *, void *, H5F_t *, bool *, unsigned *, H5O_copy_t *, + void *(*copy_file)(H5F_t *, void *, H5F_t *, bool *, unsigned *, H5O_copy_t *, void *); /*copy native value to file */ - herr_t (*post_copy_file)(const H5O_loc_t *, const void *, H5O_loc_t *, void *, unsigned *, + herr_t (*post_copy_file)(const H5O_loc_t *, const void *, H5O_loc_t *, void *, unsigned *, H5O_copy_t *); /*"post copy" action when copying native value to file */ - herr_t (*get_crt_index)(const void *, H5O_msg_crt_idx_t *); /* Get message's creation index */ - herr_t (*set_crt_index)(void *, H5O_msg_crt_idx_t); /* Set message's creation index */ - herr_t (*debug)(H5F_t *, const void *, FILE *, int, int); + herr_t (*get_crt_index)(const void *, H5O_msg_crt_idx_t *); /* Get message's creation index */ + herr_t (*set_crt_index)(void *, H5O_msg_crt_idx_t); /* Set message's creation index */ + herr_t (*debug)(H5F_t *, const void *, FILE *, int, int); }; struct H5O_mesg_t { @@ -321,17 +321,17 @@ struct H5O_t { /* Class for types of objects in file */ typedef struct H5O_obj_class_t { - H5O_type_t type; /*object type on disk */ - const char *name; /*for debugging */ - void *(*get_copy_file_udata)(void); /*retrieve user data for 'copy file' operation */ - void (*free_copy_file_udata)(void *); /*free user data for 'copy file' operation */ - htri_t (*isa)(const H5O_t *); /*if a header matches an object class */ - void *(*open)(const H5G_loc_t *, H5I_type_t *); /*open an object of this class */ - void *(*create)(H5F_t *, void *, H5G_loc_t *); /*create an object of this class */ - H5O_loc_t *(*get_oloc)(hid_t); /*get the object header location for an object */ - herr_t (*bh_info)(const H5O_loc_t *loc, H5O_t *oh, + H5O_type_t type; /*object type on disk */ + const char *name; /*for debugging */ + void *(*get_copy_file_udata)(void); /*retrieve user data for 'copy file' operation */ + void (*free_copy_file_udata)(void *); /*free user data for 'copy file' operation */ + htri_t (*isa)(const H5O_t *); /*if a header matches an object class */ + void *(*open)(const H5G_loc_t *, H5I_type_t *); /*open an object of this class */ + void *(*create)(H5F_t *, void *, H5G_loc_t *); /*create an object of this class */ + H5O_loc_t *(*get_oloc)(hid_t); /*get the object header location for an object */ + herr_t (*bh_info)(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info); /*get the index & heap info for an object */ - herr_t (*flush)(void *obj_ptr); /*flush an opened object of this class */ + herr_t (*flush)(void *obj_ptr); /*flush an opened object of this class */ } H5O_obj_class_t; /* Node in skip list to map addresses from one file to another during object header copy */ diff --git a/src/H5Opublic.h b/src/H5Opublic.h index 28954d4cb45..498e2595254 100644 --- a/src/H5Opublic.h +++ b/src/H5Opublic.h @@ -276,7 +276,7 @@ H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id); H5_DLL hid_t H5Oopen_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id, const char *name, hid_t lapl_id, hid_t es_id); #else -H5_DLL hid_t H5Oopen_async(hid_t loc_id, const char *name, hid_t lapl_id, hid_t es_id); +H5_DLL hid_t H5Oopen_async(hid_t loc_id, const char *name, hid_t lapl_id, hid_t es_id); #endif /** @@ -365,8 +365,8 @@ H5_DLL hid_t H5Oopen_by_idx_async(const char *app_file, const char *app_func, un const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id, hid_t es_id); #else -H5_DLL hid_t H5Oopen_by_idx_async(hid_t loc_id, const char *group_name, H5_index_t idx_type, - H5_iter_order_t order, hsize_t n, hid_t lapl_id, hid_t es_id); +H5_DLL hid_t H5Oopen_by_idx_async(hid_t loc_id, const char *group_name, H5_index_t idx_type, + H5_iter_order_t order, hsize_t n, hid_t lapl_id, hid_t es_id); #endif /** diff --git a/src/H5Shyper.c b/src/H5Shyper.c index ce161b01046..cbf519d3aab 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -269,7 +269,7 @@ static const H5S_sel_iter_class_t H5S_sel_iter_hyper[1] = {{ static const hsize_t H5S_hyper_zeros_g[H5S_MAX_RANK] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static const hsize_t H5S_hyper_ones_g[H5S_MAX_RANK] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; /* Declare a free list to manage the H5S_hyper_sel_t struct */ H5FL_DEFINE_STATIC(H5S_hyper_sel_t); diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h index 64fd567a9bb..caa57425b71 100644 --- a/src/H5TSprivate.h +++ b/src/H5TSprivate.h @@ -158,14 +158,14 @@ typedef struct H5TS_rwlock_t { unsigned readers, writers, read_waiters, write_waiters; } H5TS_rwlock_t; -typedef thrd_t H5TS_thread_t; -typedef int (*H5TS_thread_start_func_t)(void *); +typedef thrd_t H5TS_thread_t; +typedef int (*H5TS_thread_start_func_t)(void *); typedef int H5TS_thread_ret_t; typedef tss_t H5TS_key_t; typedef mtx_t H5TS_CAPABILITY("mutex") H5TS_mutex_t; typedef cnd_t H5TS_cond_t; typedef once_flag H5TS_once_t; -typedef void (*H5TS_once_init_func_t)(void); +typedef void (*H5TS_once_init_func_t)(void); #else #ifdef H5_HAVE_WIN_THREADS typedef HANDLE H5TS_thread_t; @@ -178,15 +178,15 @@ typedef CONDITION_VARIABLE H5TS_cond_t; typedef INIT_ONCE H5TS_once_t; typedef PINIT_ONCE_FN H5TS_once_init_func_t; #else -typedef pthread_t H5TS_thread_t; -typedef void *(*H5TS_thread_start_func_t)(void *); +typedef pthread_t H5TS_thread_t; +typedef void *(*H5TS_thread_start_func_t)(void *); typedef void *H5TS_thread_ret_t; typedef pthread_key_t H5TS_key_t; typedef pthread_mutex_t H5TS_CAPABILITY("mutex") H5TS_mutex_t; typedef pthread_rwlock_t H5TS_rwlock_t; typedef pthread_cond_t H5TS_cond_t; typedef pthread_once_t H5TS_once_t; -typedef void (*H5TS_once_init_func_t)(void); +typedef void (*H5TS_once_init_func_t)(void); #endif #endif diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index c3171ca0b81..04d22313f5f 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -249,7 +249,7 @@ typedef enum { /* VL function pointers */ typedef herr_t (*H5T_vlen_getlen_func_t)(H5VL_object_t *file, const void *vl_addr, size_t *len); -typedef void *(*H5T_vlen_getptr_func_t)(void *vl_addr); +typedef void *(*H5T_vlen_getptr_func_t)(void *vl_addr); typedef herr_t (*H5T_vlen_isnull_func_t)(const H5VL_object_t *file, void *vl_addr, bool *isnull); typedef herr_t (*H5T_vlen_setnull_func_t)(H5VL_object_t *file, void *_vl, void *_bg); typedef herr_t (*H5T_vlen_read_func_t)(H5VL_object_t *file, void *_vl, void *buf, size_t len); diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h index 57a5b6047c3..522488b0e90 100644 --- a/src/H5Tpublic.h +++ b/src/H5Tpublic.h @@ -1259,7 +1259,7 @@ H5_DLL hid_t H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id); H5_DLL hid_t H5Topen_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id, const char *name, hid_t tapl_id, hid_t es_id); #else -H5_DLL hid_t H5Topen_async(hid_t loc_id, const char *name, hid_t tapl_id, hid_t es_id); +H5_DLL hid_t H5Topen_async(hid_t loc_id, const char *name, hid_t tapl_id, hid_t es_id); #endif /** * \ingroup H5T diff --git a/src/H5VLconnector.h b/src/H5VLconnector.h index 19e5e11999c..84a658218d5 100644 --- a/src/H5VLconnector.h +++ b/src/H5VLconnector.h @@ -843,8 +843,8 @@ typedef int H5VL_blob_optional_t; /* VOL connector info fields & callbacks */ typedef struct H5VL_info_class_t { - size_t size; /* Size of the VOL info */ - void *(*copy)(const void *info); /* Callback to create a copy of the VOL info */ + size_t size; /* Size of the VOL info */ + void *(*copy)(const void *info); /* Callback to create a copy of the VOL info */ herr_t (*cmp)(int *cmp_value, const void *info1, const void *info2); /* Callback to compare VOL info */ herr_t (*free)(void *info); /* Callback to release a VOL info */ herr_t (*to_str)(const void *info, char **str); /* Callback to serialize connector's info into a string */ @@ -856,22 +856,22 @@ typedef struct H5VL_info_class_t { /* (These must be implemented by "pass through" VOL connectors, and should not be implemented by terminal VOL * connectors) */ typedef struct H5VL_wrap_class_t { - void *(*get_object)(const void *obj); /* Callback to retrieve underlying object */ + void *(*get_object)(const void *obj); /* Callback to retrieve underlying object */ herr_t (*get_wrap_ctx)( const void *obj, void **wrap_ctx); /* Callback to retrieve the object wrapping context for the connector */ - void *(*wrap_object)(void *obj, H5I_type_t obj_type, + void *(*wrap_object)(void *obj, H5I_type_t obj_type, void *wrap_ctx); /* Callback to wrap a library object */ - void *(*unwrap_object)(void *obj); /* Callback to unwrap a library object */ + void *(*unwrap_object)(void *obj); /* Callback to unwrap a library object */ herr_t (*free_wrap_ctx)( void *wrap_ctx); /* Callback to release the object wrapping context for the connector */ } H5VL_wrap_class_t; /* H5A routines */ typedef struct H5VL_attr_class_t { - void *(*create)(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name, hid_t type_id, + void *(*create)(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req); - void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name, hid_t aapl_id, + void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name, hid_t aapl_id, hid_t dxpl_id, void **req); herr_t (*read)(void *attr, hid_t mem_type_id, void *buf, hid_t dxpl_id, void **req); herr_t (*write)(void *attr, hid_t mem_type_id, const void *buf, hid_t dxpl_id, void **req); @@ -884,9 +884,9 @@ typedef struct H5VL_attr_class_t { /* H5D routines */ typedef struct H5VL_dataset_class_t { - void *(*create)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t lcpl_id, + void *(*create)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t lcpl_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req); - void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t dapl_id, + void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t dapl_id, hid_t dxpl_id, void **req); herr_t (*read)(size_t count, void *dset[], hid_t mem_type_id[], hid_t mem_space_id[], hid_t file_space_id[], hid_t dxpl_id, void *buf[], void **req); @@ -900,9 +900,9 @@ typedef struct H5VL_dataset_class_t { /* H5T routines*/ typedef struct H5VL_datatype_class_t { - void *(*commit)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t type_id, + void *(*commit)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t dxpl_id, void **req); - void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t tapl_id, + void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t tapl_id, hid_t dxpl_id, void **req); herr_t (*get)(void *obj, H5VL_datatype_get_args_t *args, hid_t dxpl_id, void **req); herr_t (*specific)(void *obj, H5VL_datatype_specific_args_t *args, hid_t dxpl_id, void **req); @@ -912,9 +912,9 @@ typedef struct H5VL_datatype_class_t { /* H5F routines */ typedef struct H5VL_file_class_t { - void *(*create)(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, + void *(*create)(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, void **req); - void *(*open)(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req); + void *(*open)(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req); herr_t (*get)(void *obj, H5VL_file_get_args_t *args, hid_t dxpl_id, void **req); herr_t (*specific)(void *obj, H5VL_file_specific_args_t *args, hid_t dxpl_id, void **req); herr_t (*optional)(void *obj, H5VL_optional_args_t *args, hid_t dxpl_id, void **req); @@ -923,9 +923,9 @@ typedef struct H5VL_file_class_t { /* H5G routines */ typedef struct H5VL_group_class_t { - void *(*create)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t lcpl_id, + void *(*create)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req); - void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t gapl_id, + void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t gapl_id, hid_t dxpl_id, void **req); herr_t (*get)(void *obj, H5VL_group_get_args_t *args, hid_t dxpl_id, void **req); herr_t (*specific)(void *obj, H5VL_group_specific_args_t *args, hid_t dxpl_id, void **req); @@ -953,7 +953,7 @@ typedef struct H5VL_link_class_t { /* H5O routines */ typedef struct H5VL_object_class_t { - void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, H5I_type_t *opened_type, hid_t dxpl_id, + void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, H5I_type_t *opened_type, hid_t dxpl_id, void **req); herr_t (*copy)(void *src_obj, const H5VL_loc_params_t *loc_params1, const char *src_name, void *dst_obj, const H5VL_loc_params_t *loc_params2, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id, @@ -1019,13 +1019,13 @@ typedef struct H5VL_token_class_t { //! typedef struct H5VL_class_t { /* Overall connector fields & callbacks */ - unsigned version; /**< VOL connector class struct version number */ - H5VL_class_value_t value; /**< Value to identify connector */ - const char *name; /**< Connector name (MUST be unique!) */ - unsigned conn_version; /**< Version number of connector */ - uint64_t cap_flags; /**< Capability flags for connector */ - herr_t (*initialize)(hid_t vipl_id); /**< Connector initialization callback */ - herr_t (*terminate)(void); /**< Connector termination callback */ + unsigned version; /**< VOL connector class struct version number */ + H5VL_class_value_t value; /**< Value to identify connector */ + const char *name; /**< Connector name (MUST be unique!) */ + unsigned conn_version; /**< Version number of connector */ + uint64_t cap_flags; /**< Capability flags for connector */ + herr_t (*initialize)(hid_t vipl_id); /**< Connector initialization callback */ + herr_t (*terminate)(void); /**< Connector termination callback */ /* VOL framework */ H5VL_info_class_t info_cls; /**< VOL info fields & callbacks */ diff --git a/src/H5encode.h b/src/H5encode.h index 690aee104d7..d88757c4b7e 100644 --- a/src/H5encode.h +++ b/src/H5encode.h @@ -33,7 +33,7 @@ #define INT16ENCODE(p, i) \ do { \ - *(p) = (uint8_t)((unsigned)(i)&0xff); \ + *(p) = (uint8_t)((unsigned)(i) & 0xff); \ (p)++; \ *(p) = (uint8_t)(((unsigned)(i) >> 8) & 0xff); \ (p)++; \ @@ -41,7 +41,7 @@ #define UINT16ENCODE(p, i) \ do { \ - *(p) = (uint8_t)((unsigned)(i)&0xff); \ + *(p) = (uint8_t)((unsigned)(i) & 0xff); \ (p)++; \ *(p) = (uint8_t)(((unsigned)(i) >> 8) & 0xff); \ (p)++; \ @@ -49,7 +49,7 @@ #define INT32ENCODE(p, i) \ do { \ - *(p) = (uint8_t)((uint32_t)(i)&0xff); \ + *(p) = (uint8_t)((uint32_t)(i) & 0xff); \ (p)++; \ *(p) = (uint8_t)(((uint32_t)(i) >> 8) & 0xff); \ (p)++; \ @@ -61,7 +61,7 @@ #define UINT32ENCODE(p, i) \ do { \ - *(p) = (uint8_t)((i)&0xff); \ + *(p) = (uint8_t)((i) & 0xff); \ (p)++; \ *(p) = (uint8_t)(((i) >> 8) & 0xff); \ (p)++; \ @@ -149,41 +149,41 @@ #define INT16DECODE(p, i) \ do { \ - (i) = (int16_t)((*(p)&0xff)); \ + (i) = (int16_t)((*(p) & 0xff)); \ (p)++; \ - (i) |= (int16_t)(((*(p)&0xff) << 8) | ((*(p)&0x80) ? ~0xffff : 0x0)); \ + (i) |= (int16_t)(((*(p) & 0xff) << 8) | ((*(p) & 0x80) ? ~0xffff : 0x0)); \ (p)++; \ } while (0) #define UINT16DECODE(p, i) \ do { \ - (i) = (uint16_t)(*(p)&0xff); \ + (i) = (uint16_t)(*(p) & 0xff); \ (p)++; \ - (i) |= (uint16_t)((*(p)&0xff) << 8); \ + (i) |= (uint16_t)((*(p) & 0xff) << 8); \ (p)++; \ } while (0) #define INT32DECODE(p, i) \ do { \ - (i) = ((int32_t)(*(p)&0xff)); \ + (i) = ((int32_t)(*(p) & 0xff)); \ (p)++; \ - (i) |= ((int32_t)(*(p)&0xff) << 8); \ + (i) |= ((int32_t)(*(p) & 0xff) << 8); \ (p)++; \ - (i) |= ((int32_t)(*(p)&0xff) << 16); \ + (i) |= ((int32_t)(*(p) & 0xff) << 16); \ (p)++; \ - (i) |= ((int32_t)(((*(p) & (unsigned)0xff) << 24) | ((*(p)&0x80) ? ~0xffffffffULL : 0x0ULL))); \ + (i) |= ((int32_t)(((*(p) & (unsigned)0xff) << 24) | ((*(p) & 0x80) ? ~0xffffffffULL : 0x0ULL))); \ (p)++; \ } while (0) #define UINT32DECODE(p, i) \ do { \ - (i) = (uint32_t)(*(p)&0xff); \ + (i) = (uint32_t)(*(p) & 0xff); \ (p)++; \ - (i) |= ((uint32_t)(*(p)&0xff) << 8); \ + (i) |= ((uint32_t)(*(p) & 0xff) << 8); \ (p)++; \ - (i) |= ((uint32_t)(*(p)&0xff) << 16); \ + (i) |= ((uint32_t)(*(p) & 0xff) << 16); \ (p)++; \ - (i) |= ((uint32_t)(*(p)&0xff) << 24); \ + (i) |= ((uint32_t)(*(p) & 0xff) << 24); \ (p)++; \ } while (0) diff --git a/src/H5private.h b/src/H5private.h index a506cb36075..86799d362b6 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -857,7 +857,7 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation); #ifdef H5_HAVE_VASPRINTF #define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A) #else -H5_DLL int HDvasprintf(char **bufp, const char *fmt, va_list _ap); +H5_DLL int HDvasprintf(char **bufp, const char *fmt, va_list _ap); #endif #endif diff --git a/src/H5timer.c b/src/H5timer.c index badbc659213..db609ec611e 100644 --- a/src/H5timer.c +++ b/src/H5timer.c @@ -200,7 +200,7 @@ H5_now_usec(void) #else /* H5_HAVE_GETTIMEOFDAY */ /* Cast all values in this expression to uint64_t to ensure that all intermediate calculations * are done in 64 bit, to prevent overflow */ - now = ((uint64_t)time(NULL) * ((uint64_t)1000 * (uint64_t)1000)); + now = ((uint64_t)time(NULL) * ((uint64_t)1000 * (uint64_t)1000)); #endif /* H5_HAVE_GETTIMEOFDAY */ return (now); diff --git a/src/uthash.h b/src/uthash.h index b1e5cbb9007..469448d83f5 100644 --- a/src/uthash.h +++ b/src/uthash.h @@ -700,28 +700,38 @@ typedef unsigned char uint8_t; switch (_hj_k) { \ case 11: \ hashv += ((unsigned)_hj_key[10] << 24); \ + H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ + case 10: \ + hashv += ((unsigned)_hj_key[9] << 16); \ + H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ + case 9: \ + hashv += ((unsigned)_hj_key[8] << 8); \ + H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ + case 8: \ + _hj_j += ((unsigned)_hj_key[7] << 24); \ + H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ + case 7: \ + _hj_j += ((unsigned)_hj_key[6] << 16); \ + H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ + case 6: \ + _hj_j += ((unsigned)_hj_key[5] << 8); \ + H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ + case 5: \ + _hj_j += _hj_key[4]; \ + H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ + case 4: \ + _hj_i += ((unsigned)_hj_key[3] << 24); \ + H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ + case 3: \ + _hj_i += ((unsigned)_hj_key[2] << 16); \ + H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ + case 2: \ + _hj_i += ((unsigned)_hj_key[1] << 8); \ + H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ + case 1: \ + _hj_i += _hj_key[0]; \ H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ - case 10 : hashv += ((unsigned)_hj_key[9] << 16); \ - H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ - case 9 : hashv += ((unsigned)_hj_key[8] << 8); \ - H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ - case 8 : _hj_j += ((unsigned)_hj_key[7] << 24); \ - H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ - case 7 : _hj_j += ((unsigned)_hj_key[6] << 16); \ - H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ - case 6 : _hj_j += ((unsigned)_hj_key[5] << 8); \ - H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ - case 5 : _hj_j += _hj_key[4]; \ - H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ - case 4 : _hj_i += ((unsigned)_hj_key[3] << 24); \ - H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ - case 3 : _hj_i += ((unsigned)_hj_key[2] << 16); \ - H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ - case 2 : _hj_i += ((unsigned)_hj_key[1] << 8); \ - H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ - case 1 : _hj_i += _hj_key[0]; \ - H5_ATTR_FALLTHROUGH /* FALLTHROUGH */ \ - default:; \ + default :; \ } \ HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ } while (0) diff --git a/test/API/H5_api_async_test.c b/test/API/H5_api_async_test.c index 56fb0cc2e0b..8399074a216 100644 --- a/test/API/H5_api_async_test.c +++ b/test/API/H5_api_async_test.c @@ -1196,9 +1196,9 @@ test_set_extent(void) hid_t file_id = H5I_INVALID_HID; hid_t dset_id = H5I_INVALID_HID; hid_t fspace_id[6] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID}; + H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID}; hid_t fspace_out[6] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID}; + H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID}; hid_t mspace_id = H5I_INVALID_HID; hid_t dcpl_id = H5I_INVALID_HID; hid_t es_id = H5I_INVALID_HID; diff --git a/test/cache.c b/test/cache.c index f637bc6cf1e..5be0874df5f 100644 --- a/test/cache.c +++ b/test/cache.c @@ -3148,7 +3148,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ false, /* expected_destroyed = */ false}, - {/* entry_num = */ 1, + {/* entry_num = */ 1, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 75, /* insert_flag = */ false, @@ -3156,7 +3156,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ true, /* expected_destroyed = */ false}, - {/* entry_num = */ 2, + {/* entry_num = */ 2, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 25, /* insert_flag = */ true, @@ -3164,7 +3164,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ false, /* expected_serialized = */ true, /* expected_destroyed = */ false}, - {/* entry_num = */ 3, + {/* entry_num = */ 3, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 50, /* insert_flag = */ true, @@ -3172,7 +3172,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ false, /* expected_serialized = */ true, /* expected_destroyed = */ false}, - {/* entry_num = */ 4, + {/* entry_num = */ 4, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 10, /* insert_flag = */ false, @@ -3180,7 +3180,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ false, /* expected_destroyed = */ false}, - {/* entry_num = */ 5, + {/* entry_num = */ 5, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 20, /* insert_flag = */ false, @@ -3188,7 +3188,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ true, /* expected_destroyed = */ false}, - {/* entry_num = */ 6, + {/* entry_num = */ 6, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 30, /* insert_flag = */ true, @@ -3196,7 +3196,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ false, /* expected_serialized = */ true, /* expected_destroyed = */ false}, - {/* entry_num = */ 7, + {/* entry_num = */ 7, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 40, /* insert_flag = */ true, @@ -3220,7 +3220,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ false, /* expected_destroyed = */ true}, - {/* entry_num = */ 1, + {/* entry_num = */ 1, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 75, /* insert_flag = */ false, @@ -3228,7 +3228,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ true, /* expected_destroyed = */ true}, - {/* entry_num = */ 2, + {/* entry_num = */ 2, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 25, /* insert_flag = */ true, @@ -3236,7 +3236,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ false, /* expected_serialized = */ true, /* expected_destroyed = */ true}, - {/* entry_num = */ 3, + {/* entry_num = */ 3, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 50, /* insert_flag = */ true, @@ -3244,7 +3244,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ false, /* expected_serialized = */ true, /* expected_destroyed = */ true}, - {/* entry_num = */ 4, + {/* entry_num = */ 4, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 10, /* insert_flag = */ false, @@ -3252,7 +3252,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ false, /* expected_destroyed = */ true}, - {/* entry_num = */ 5, + {/* entry_num = */ 5, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 20, /* insert_flag = */ false, @@ -3260,7 +3260,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ true, /* expected_destroyed = */ true}, - {/* entry_num = */ 6, + {/* entry_num = */ 6, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 30, /* insert_flag = */ true, @@ -3268,7 +3268,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ false, /* expected_serialized = */ true, /* expected_destroyed = */ true}, - {/* entry_num = */ 7, + {/* entry_num = */ 7, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 40, /* insert_flag = */ true, @@ -3292,7 +3292,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ false, /* expected_destroyed = */ false}, - {/* entry_num = */ 1, + {/* entry_num = */ 1, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 75, /* insert_flag = */ false, @@ -3300,7 +3300,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ false, /* expected_destroyed = */ false}, - {/* entry_num = */ 2, + {/* entry_num = */ 2, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 25, /* insert_flag = */ true, @@ -3308,7 +3308,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ false, /* expected_serialized = */ false, /* expected_destroyed = */ false}, - {/* entry_num = */ 3, + {/* entry_num = */ 3, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 50, /* insert_flag = */ true, @@ -3316,7 +3316,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ false, /* expected_serialized = */ false, /* expected_destroyed = */ false}, - {/* entry_num = */ 4, + {/* entry_num = */ 4, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 10, /* insert_flag = */ false, @@ -3324,7 +3324,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ false, /* expected_destroyed = */ false}, - {/* entry_num = */ 5, + {/* entry_num = */ 5, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 20, /* insert_flag = */ false, @@ -3332,7 +3332,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ false, /* expected_destroyed = */ false}, - {/* entry_num = */ 6, + {/* entry_num = */ 6, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 30, /* insert_flag = */ true, @@ -3340,7 +3340,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ false, /* expected_serialized = */ false, /* expected_destroyed = */ false}, - {/* entry_num = */ 7, + {/* entry_num = */ 7, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 40, /* insert_flag = */ true, @@ -3364,7 +3364,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ false, /* expected_destroyed = */ true}, - {/* entry_num = */ 1, + {/* entry_num = */ 1, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 75, /* insert_flag = */ false, @@ -3372,7 +3372,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ false, /* expected_destroyed = */ true}, - {/* entry_num = */ 2, + {/* entry_num = */ 2, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 25, /* insert_flag = */ true, @@ -3380,7 +3380,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ false, /* expected_serialized = */ false, /* expected_destroyed = */ true}, - {/* entry_num = */ 3, + {/* entry_num = */ 3, /* entry_type = */ PICO_ENTRY_TYPE, /* entry_index = */ 50, /* insert_flag = */ true, @@ -3388,7 +3388,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ false, /* expected_serialized = */ false, /* expected_destroyed = */ true}, - {/* entry_num = */ 4, + {/* entry_num = */ 4, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 10, /* insert_flag = */ false, @@ -3396,7 +3396,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ false, /* expected_destroyed = */ true}, - {/* entry_num = */ 5, + {/* entry_num = */ 5, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 20, /* insert_flag = */ false, @@ -3404,7 +3404,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ true, /* expected_serialized = */ false, /* expected_destroyed = */ true}, - {/* entry_num = */ 6, + {/* entry_num = */ 6, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 30, /* insert_flag = */ true, @@ -3412,7 +3412,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* expected_deserialized = */ false, /* expected_serialized = */ false, /* expected_destroyed = */ true}, - {/* entry_num = */ 7, + {/* entry_num = */ 7, /* entry_type = */ MONSTER_ENTRY_TYPE, /* entry_index = */ 40, /* insert_flag = */ true, @@ -3573,7 +3573,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* num_pins = */ 5, /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, MONSTER_ENTRY_TYPE, -1, -1, - -1}, + -1}, /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, 10, -1, -1, -1}, /* expected_deserialized = */ true, /* expected_serialized = */ true, @@ -3586,7 +3586,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* num_pins = */ 6, /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, MONSTER_ENTRY_TYPE, - MONSTER_ENTRY_TYPE, -1, -1}, + MONSTER_ENTRY_TYPE, -1, -1}, /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, 10, 20, -1, -1}, /* expected_deserialized = */ false, /* expected_serialized = */ true, @@ -3599,7 +3599,7 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) /* num_pins = */ 7, /* pin_type[MAX_PINS] = */ {PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, PICO_ENTRY_TYPE, MONSTER_ENTRY_TYPE, - MONSTER_ENTRY_TYPE, MONSTER_ENTRY_TYPE, -1}, + MONSTER_ENTRY_TYPE, MONSTER_ENTRY_TYPE, -1}, /* pin_idx[MAX_PINS] = */ {100, 75, 25, 50, 10, 20, 30, -1}, /* expected_deserialized = */ false, /* expected_serialized = */ true, diff --git a/test/dsets.c b/test/dsets.c index 7bcec3c956b..0df604e7ae6 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -3321,7 +3321,7 @@ test_nbit_float(hid_t file) * dataset datatype (no precision loss during datatype conversion) */ float orig_data[2][5] = {{188384.0F, 19.103516F, -1.0831790e9F, -84.242188F, 5.2045898F}, - {-49140.0F, 2350.25F, -3.2110596e-1F, 6.4998865e-5F, -0.0F}}; + {-49140.0F, 2350.25F, -3.2110596e-1F, 6.4998865e-5F, -0.0F}}; float new_data[2][5]; size_t precision, offset; size_t i, j; @@ -3708,7 +3708,7 @@ test_nbit_compound(hid_t file) const hsize_t size[2] = {2, 5}; const hsize_t chunk_size[2] = {2, 5}; const float float_val[2][5] = {{188384.0F, 19.103516F, -1.0831790e9F, -84.242188F, 5.2045898F}, - {-49140.0F, 2350.25F, -3.2110596e-1F, 6.4998865e-5F, -0.0F}}; + {-49140.0F, 2350.25F, -3.2110596e-1F, 6.4998865e-5F, -0.0F}}; atomic orig_data[2][5]; atomic new_data[2][5]; unsigned int i_mask, s_mask, c_mask; @@ -3935,7 +3935,7 @@ test_nbit_compound_2(hid_t file) const hsize_t size[2] = {2, 5}; const hsize_t chunk_size[2] = {2, 5}; const float float_val[2][5] = {{188384.0F, 19.103516F, -1.0831790e9F, -84.242188F, 5.2045898F}, - {-49140.0F, 2350.25F, -3.2110596e-1F, 6.4998865e-5F, -0.0F}}; + {-49140.0F, 2350.25F, -3.2110596e-1F, 6.4998865e-5F, -0.0F}}; complex orig_data[2][5]; complex new_data[2][5]; unsigned int i_mask, s_mask, c_mask, b_mask; @@ -12724,9 +12724,9 @@ test_bt2_hdr_fd(const char *driver_name, hid_t fapl) const hsize_t maxshape[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; const hsize_t chunk[2] = {8, 8}; const int buffer[8][8] = {{0, 1, 2, 3, 4, 5, 6, 7}, {8, 9, 10, 11, 12, 13, 14, 15}, - {16, 17, 18, 19, 20, 21, 22, 23}, {24, 25, 26, 27, 28, 29, 30, 31}, - {32, 33, 34, 35, 36, 37, 38, 39}, {40, 41, 42, 43, 44, 45, 46, 47}, - {48, 49, 50, 51, 52, 53, 54, 55}, {56, 57, 58, 59, 60, 61, 62, 63}}; + {16, 17, 18, 19, 20, 21, 22, 23}, {24, 25, 26, 27, 28, 29, 30, 31}, + {32, 33, 34, 35, 36, 37, 38, 39}, {40, 41, 42, 43, 44, 45, 46, 47}, + {48, 49, 50, 51, 52, 53, 54, 55}, {56, 57, 58, 59, 60, 61, 62, 63}}; H5O_info2_t info; TESTING("Version 2 B-tree chunk index header flush dependencies handled correctly"); diff --git a/test/dtransform.c b/test/dtransform.c index 6ec48a68e25..53b1f1bc1a8 100644 --- a/test/dtransform.c +++ b/test/dtransform.c @@ -121,7 +121,7 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22, do { \ struct { \ TYPE arr[ROWS][COLS]; \ - } *array = NULL; \ + } *array = NULL; \ const char *f_to_c = "(5/9.0)*(x-32)"; \ /* utrans is a transform for char types: numbers are restricted from -128 to 127, fits into char */ \ const char *utrans = "(x/4+25)*3"; \ @@ -217,7 +217,7 @@ const int transformData[ROWS][COLS] = {{36, 31, 25, 19, 13, 7, 1, 5, 11, 16, 22, do { \ struct { \ TYPE arr[ROWS][COLS]; \ - } *array = NULL; \ + } *array = NULL; \ const char *f_to_c = "(5/9.0)*(x-32)"; \ /* utrans is a transform for char types: numbers are restricted from -128 to 127, fits into char */ \ const char *utrans = "(x/4+25)*3"; \ diff --git a/test/dtypes.c b/test/dtypes.c index fc23aa9dd1f..41b3ddf5a49 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -774,10 +774,10 @@ test_compound_2(void) { struct st { int a, b, c[4], d, e; - } * s_ptr; + } *s_ptr; struct dt { int e, d, c[4], b, a; - } * d_ptr; + } *d_ptr; const size_t nelmts = NTESTELEM; const hsize_t four = 4; @@ -899,10 +899,10 @@ test_compound_3(void) { struct st { int a, b, c[4], d, e; - } * s_ptr; + } *s_ptr; struct dt { int a, c[4], e; - } * d_ptr; + } *d_ptr; const size_t nelmts = NTESTELEM; const hsize_t four = 4; @@ -1021,13 +1021,13 @@ test_compound_4(void) struct st { int a, b, c[4], d, e; - } * s_ptr; + } *s_ptr; struct dt { short b; int a, c[4]; short d; int e; - } * d_ptr; + } *d_ptr; const size_t nelmts = NTESTELEM; const hsize_t four = 4; @@ -1249,11 +1249,11 @@ test_compound_6(void) struct st { short b; short d; - } * s_ptr; + } *s_ptr; struct dt { long b; long d; - } * d_ptr; + } *d_ptr; const size_t nelmts = NTESTELEM; unsigned char *buf = NULL, *orig = NULL, *bkg = NULL; @@ -7693,7 +7693,7 @@ test_int_float_except(void) { #if H5_SIZEOF_INT == 4 && H5_SIZEOF_FLOAT == 4 float buf[CONVERT_SIZE] = {(float)INT_MIN - 172.0F, (float)INT_MAX - 32.0F, (float)INT_MAX - 68.0F, - (float)4.5F}; + (float)4.5F}; int buf_int[CONVERT_SIZE] = {INT_MIN, INT_MAX, INT_MAX - 127, 4}; float buf_float[CONVERT_SIZE] = {(float)INT_MIN, (float)INT_MAX + 1.0F, (float)INT_MAX - 127.0F, 4}; int *intp; /* Pointer to buffer, as integers */ @@ -10126,7 +10126,7 @@ test_versionbounds(void) hsize_t arr_dim[] = {ARRAY_LEN}; /* Length of the array */ int low, high; /* Indices for iterating over versions */ H5F_libver_t versions[] = {H5F_LIBVER_EARLIEST, H5F_LIBVER_V18, H5F_LIBVER_V110, - H5F_LIBVER_V112, H5F_LIBVER_V114, H5F_LIBVER_V116}; + H5F_LIBVER_V112, H5F_LIBVER_V114, H5F_LIBVER_V116}; int versions_count = 6; /* Number of version bounds in the array */ unsigned highest_version; /* Highest version in nested datatypes */ color_t enum_val; /* Enum type index */ diff --git a/test/earray.c b/test/earray.c index edd054994c7..acd1a5c6de6 100644 --- a/test/earray.c +++ b/test/earray.c @@ -114,13 +114,13 @@ typedef struct earray_test_param_t earray_test_param_t; /* Extensible array iterator class */ typedef struct earray_iter_t { - void *(*init)(const H5EA_create_t *cparam, const earray_test_param_t *tparam, - hsize_t cnt); /* Initialize/allocate iterator private info */ + void *(*init)(const H5EA_create_t *cparam, const earray_test_param_t *tparam, + hsize_t cnt); /* Initialize/allocate iterator private info */ hssize_t (*next)(void *info); /* Get the next element to test */ hssize_t (*max_elem)(const void *info); /* Get the max. element set */ - int (*state)(void *in_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam, + int (*state)(void *in_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam, earray_state_t *state, hsize_t idx); /* Get the state of the extensible array */ - herr_t (*term)(void *info); /* Shutdown/free iterator private info */ + herr_t (*term)(void *info); /* Shutdown/free iterator private info */ } earray_iter_t; /* Testing parameters */ diff --git a/test/enum.c b/test/enum.c index 2c8e8cd28d7..ac348fcb437 100644 --- a/test/enum.c +++ b/test/enum.c @@ -139,8 +139,8 @@ test_conv(hid_t file) c_e1 val; /* Some values are out of range for testing. The library should accept them */ c_e1 data1[] = {E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE, E1_WHITE, E1_BLACK, - E1_GREEN, E1_BLUE, E1_RED, E1_RED, E1_BLUE, E1_GREEN, E1_BLACK, - E1_WHITE, E1_RED, E1_WHITE, (c_e1)0, (c_e1)-1, (c_e1)-2}; + E1_GREEN, E1_BLUE, E1_RED, E1_RED, E1_BLUE, E1_GREEN, E1_BLACK, + E1_WHITE, E1_RED, E1_WHITE, (c_e1)0, (c_e1)-1, (c_e1)-2}; c_e1 data2[NELMTS(data1)]; short data_short[NELMTS(data1)]; int data_int[NELMTS(data1)]; @@ -314,7 +314,7 @@ test_tr1(hid_t file) c_e1 eval; int ival; c_e1 data1[10] = {E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE, - E1_WHITE, E1_BLACK, E1_GREEN, E1_BLUE, E1_RED}; + E1_WHITE, E1_BLACK, E1_GREEN, E1_BLUE, E1_RED}; c_e1 data2[10]; TESTING("O(1) conversions"); @@ -414,7 +414,7 @@ test_tr2(hid_t file) c_e1 val1; int val2; c_e1 data1[10] = {E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE, - E1_WHITE, E1_BLACK, E1_GREEN, E1_BLUE, E1_RED}; + E1_WHITE, E1_BLACK, E1_GREEN, E1_BLUE, E1_RED}; c_e1 data2[10]; TESTING("O(log N) conversions"); diff --git a/test/farray.c b/test/farray.c index b4cd1fef3c8..69adffd1ef0 100644 --- a/test/farray.c +++ b/test/farray.c @@ -81,10 +81,10 @@ typedef struct farray_test_param_t farray_test_param_t; /* Fixed array iterator class */ typedef struct farray_iter_t { - void *(*init)(const H5FA_create_t *cparam, const farray_test_param_t *tparam, - hsize_t cnt); /* Initialize/allocate iterator private info */ - hssize_t (*next)(void *info); /* Get the next element to test */ - herr_t (*term)(void *info); /* Shutdown/free iterator private info */ + void *(*init)(const H5FA_create_t *cparam, const farray_test_param_t *tparam, + hsize_t cnt); /* Initialize/allocate iterator private info */ + hssize_t (*next)(void *info); /* Get the next element to test */ + herr_t (*term)(void *info); /* Shutdown/free iterator private info */ } farray_iter_t; /* Testing parameters */ diff --git a/test/fillval.c b/test/fillval.c index 49ee2011256..b86f153a6ef 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -1565,17 +1565,17 @@ static int test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t *ch_size, hsize_t *start_size, hsize_t *max_size, hid_t dtype, void *fillval) { - hid_t fspace = H5I_INVALID_HID, mspace = H5I_INVALID_HID; /* File & memory dataspaces */ - hid_t dset = H5I_INVALID_HID; /* Dataset ID */ - hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */ - hsize_t extend_size[5]; /* Dimensions to extend to */ - hsize_t one[5] = {1, 1, 1, 1, 1}; /* Dimensions of single element dataspace */ - hsize_t hs_size[5], hs_stride[5], hs_offset[5]; - size_t nelmts; - H5T_class_t dtype_class; /* Class of datatype */ - int (*init_rtn)(void *, size_t, const void *); - int (*verify_rtn)(unsigned, const hsize_t *, const void *, const void *); - int (*release_rtn)(void *); + hid_t fspace = H5I_INVALID_HID, mspace = H5I_INVALID_HID; /* File & memory dataspaces */ + hid_t dset = H5I_INVALID_HID; /* Dataset ID */ + hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */ + hsize_t extend_size[5]; /* Dimensions to extend to */ + hsize_t one[5] = {1, 1, 1, 1, 1}; /* Dimensions of single element dataspace */ + hsize_t hs_size[5], hs_stride[5], hs_offset[5]; + size_t nelmts; + H5T_class_t dtype_class; /* Class of datatype */ + int (*init_rtn)(void *, size_t, const void *); + int (*verify_rtn)(unsigned, const hsize_t *, const void *, const void *); + int (*release_rtn)(void *); size_t val_size; /* Size of element */ void *val_rd, *odd_val; const void *init_val, *should_be, *even_val; diff --git a/test/gen_filespace.c b/test/gen_filespace.c index 27f3d2628cb..d2572887674 100644 --- a/test/gen_filespace.c +++ b/test/gen_filespace.c @@ -26,8 +26,8 @@ const char *FILENAMES[] = { #define DATASET "dset" #define NUM_ELMTS 100 -#define false 0 -#define true 1 +#define false 0 +#define true 1 /* * Compile and run this program in the trunk to generate diff --git a/test/gen_plist.c b/test/gen_plist.c index 1400b4095a6..5f5f95c80e1 100644 --- a/test/gen_plist.c +++ b/test/gen_plist.c @@ -48,35 +48,35 @@ main(void) int little_endian; int word_length; H5AC_cache_config_t my_cache_config = {H5AC__CURR_CACHE_CONFIG_VERSION, - 1 /*true*/, - 0 /*false*/, - 0 /*false*/, - "temp", - 1 /*true*/, - 0 /*false*/, - (2 * 2048 * 1024), - 0.3, - (64 * 1024 * 1024), - (4 * 1024 * 1024), - 60000, - H5C_incr__threshold, - 0.8, - 3.0, - 1 /*true*/, - (8 * 1024 * 1024), - H5C_flash_incr__add_space, - 2.0, - 0.25, - H5C_decr__age_out_with_threshold, - 0.997, - 0.8, - 1 /*true*/, - (3 * 1024 * 1024), - 3, - 0 /*false*/, - 0.2, - (256 * 2048), - H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY}; + 1 /*true*/, + 0 /*false*/, + 0 /*false*/, + "temp", + 1 /*true*/, + 0 /*false*/, + (2 * 2048 * 1024), + 0.3, + (64 * 1024 * 1024), + (4 * 1024 * 1024), + 60000, + H5C_incr__threshold, + 0.8, + 3.0, + 1 /*true*/, + (8 * 1024 * 1024), + H5C_flash_incr__add_space, + 2.0, + 0.25, + H5C_decr__age_out_with_threshold, + 0.997, + 0.8, + 1 /*true*/, + (3 * 1024 * 1024), + 3, + 0 /*false*/, + 0.2, + (256 * 2048), + H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY}; H5AC_cache_image_config_t my_cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, true, false, -1}; diff --git a/test/hdfs.c b/test/hdfs.c index 956621f384c..bf67e045abc 100644 --- a/test/hdfs.c +++ b/test/hdfs.c @@ -588,10 +588,10 @@ test_hdfs_fapl(void) * test-local variables * ************************/ - hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */ - hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */ - unsigned long driver_flags = 0; /* VFD feature flags */ - H5FD_hdfs_fapl_t hdfs_fa_0 = { + hid_t fapl_id = H5I_INVALID_HID; /* file access property list ID */ + hid_t driver_id = H5I_INVALID_HID; /* ID for this VFD */ + unsigned long driver_flags = 0; /* VFD feature flags */ + H5FD_hdfs_fapl_t hdfs_fa_0 = { 1, /* version*/ "", /* node name */ 9000, /* node port */ @@ -672,7 +672,7 @@ test_vfd_open(void) * test-local macros * *********************/ -/* selectors for which fapl to use in testcase */ + /* selectors for which fapl to use in testcase */ #define FAPL_H5P_DEFAULT -2 #define FAPL_UNCONFIGURED -3 /* H5P_FILE_ACCESS */ #define FAPL_HDFS -4 @@ -684,10 +684,10 @@ test_vfd_open(void) struct test_condition { const char *message; const char *url; - unsigned flags; - int which_fapl; - haddr_t maxaddr; - bool might_use_other_driver; + unsigned flags; + int which_fapl; + haddr_t maxaddr; + bool might_use_other_driver; }; /************************ @@ -776,11 +776,11 @@ test_vfd_open(void) false, }, }; - unsigned i = 0; + unsigned i = 0; unsigned failing_conditions_count = 10; - H5FD_t *fd = NULL; - hid_t fapl_hdfs = H5I_INVALID_HID; - hid_t fapl_unconfigured = H5I_INVALID_HID; + H5FD_t *fd = NULL; + hid_t fapl_hdfs = H5I_INVALID_HID; + hid_t fapl_unconfigured = H5I_INVALID_HID; TESTING("HDFS VFD-level open"); @@ -798,8 +798,8 @@ test_vfd_open(void) /* all the test cases that will _not_ open */ for (i = 0; i < failing_conditions_count; i++) { - struct test_condition T = failing_conditions[i]; - hid_t fapl_id = H5P_DEFAULT; + struct test_condition T = failing_conditions[i]; + hid_t fapl_id = H5P_DEFAULT; fd = NULL; @@ -934,7 +934,7 @@ test_eof_eoa(void) ************************/ H5FD_t *fd_shakespeare = NULL; - hid_t fapl_id = H5I_INVALID_HID; + hid_t fapl_id = H5I_INVALID_HID; TESTING("HDFS eof/eoa gets and sets"); @@ -1031,10 +1031,10 @@ test_H5FDread_without_eoa_set_fails(void) #else - char buffer[HDFS_TEST_MAX_BUF_SIZE]; - unsigned int i = 0; - H5FD_t *file_shakespeare = NULL; - hid_t fapl_id = H5I_INVALID_HID; + char buffer[HDFS_TEST_MAX_BUF_SIZE]; + unsigned int i = 0; + H5FD_t *file_shakespeare = NULL; + hid_t fapl_id = H5I_INVALID_HID; TESTING("HDFS VFD read-eoa temporal coupling library limitation"); @@ -1139,10 +1139,10 @@ test_read(void) *************************/ struct testcase { const char *message; /* purpose of test case */ - haddr_t eoa_set; /* set file EOA to this prior to read */ - size_t addr; /* offset of read in file */ - size_t len; /* length of read in file */ - herr_t success; /* expected return value of read function */ + haddr_t eoa_set; /* set file EOA to this prior to read */ + size_t addr; /* offset of read in file */ + size_t len; /* length of read in file */ + herr_t success; /* expected return value of read function */ const char *expected; /* expected contents of buffer; failure ignores */ }; @@ -1199,14 +1199,14 @@ test_read(void) NULL, }, }; - unsigned testcase_count = 6; - unsigned test_i = 0; + unsigned testcase_count = 6; + unsigned test_i = 0; struct testcase test; - herr_t open_return = FAIL; - char buffer[HDFS_TEST_MAX_BUF_SIZE]; - unsigned int i = 0; - H5FD_t *file_raven = NULL; - hid_t fapl_id = H5I_INVALID_HID; + herr_t open_return = FAIL; + char buffer[HDFS_TEST_MAX_BUF_SIZE]; + unsigned int i = 0; + H5FD_t *file_raven = NULL; + hid_t fapl_id = H5I_INVALID_HID; TESTING("HDFS VFD read/range-gets"); @@ -1243,7 +1243,7 @@ test_read(void) * per-test setup * * -------------- */ - test = cases[test_i]; + test = cases[test_i]; open_return = FAIL; FAIL_IF(HDFS_TEST_MAX_BUF_SIZE < test.len) /* buffer too small! */ @@ -1349,8 +1349,8 @@ test_noops_and_autofails(void) * test-local variables * ************************/ - hid_t fapl_id = H5I_INVALID_HID; - H5FD_t *file = NULL; + hid_t fapl_id = H5I_INVALID_HID; + H5FD_t *file = NULL; const char data[36] = "The Force shall be with you, always"; TESTING("HDFS VFD always-fail and no-op routines"); @@ -1485,7 +1485,7 @@ test_H5F_integration(void) * test-local variables * ************************/ - hid_t file = H5I_INVALID_HID; + hid_t file = H5I_INVALID_HID; hid_t fapl_id = H5I_INVALID_HID; TESTING("HDFS file access through HD5F library (H5F API)"); diff --git a/test/set_extent.c b/test/set_extent.c index bee03140cb3..80cc57a6ceb 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -2316,7 +2316,7 @@ test_random_rank4(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fillvalue, bool di } *wbuf = NULL; /* Write buffer */ struct { hsize_t arr[RAND4_NITER + 1][4]; - } *dim_log = NULL; /* Log of dataset dimensions */ + } *dim_log = NULL; /* Log of dataset dimensions */ bool zero_dim = false; /* Whether a dimension is 0 */ bool writing = true; /* Whether we're writing to the dset */ unsigned scalar_iter; /* Iteration to shrink dset to 1x1x1x1 */ @@ -2533,7 +2533,7 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hid_t dxpl, bool do_fillvalue, bool } *wbuf = NULL; /* Write buffer */ struct { hsize_t arr[RAND4_NITER + 1][4]; - } *dim_log = NULL; /* Log of dataset dimensions */ + } *dim_log = NULL; /* Log of dataset dimensions */ bool zero_dim = false; /* Whether a dimension is 0 */ bool writing = true; /* Whether we're writing to the dset */ hvl_t fill_value; /* Fill value */ diff --git a/test/tcoords.c b/test/tcoords.c index b223600a4d2..c1d5c4083f2 100644 --- a/test/tcoords.c +++ b/test/tcoords.c @@ -386,7 +386,7 @@ test_multiple_ends(hid_t file, bool is_chunked) /* For testing the full selections in the fastest-growing end and in the middle dimensions */ struct { int arr[1][1][1][4][2][1][6][2]; - } *mem1_buffer = NULL; + } *mem1_buffer = NULL; hsize_t mem1_dims[8] = {1, 1, 1, 4, 2, 1, 6, 2}; hsize_t mem1_start[8] = {0, 0, 0, 0, 0, 0, 0, 0}; hsize_t mem1_count[8] = {1, 1, 1, 1, 1, 1, 1, 1}; @@ -396,7 +396,7 @@ test_multiple_ends(hid_t file, bool is_chunked) /* For testing the full selections in the slowest-growing end and in the middle dimensions */ struct { int arr[4][5][1][4][2][1][1][1]; - } *mem2_buffer = NULL; + } *mem2_buffer = NULL; hsize_t mem2_dims[8] = {4, 5, 1, 4, 2, 1, 1, 1}; hsize_t mem2_start[8] = {0, 0, 0, 0, 0, 0, 0, 0}; hsize_t mem2_count[8] = {1, 1, 1, 1, 1, 1, 1, 1}; @@ -406,7 +406,7 @@ test_multiple_ends(hid_t file, bool is_chunked) /* For testing two unadjacent full selections in the middle dimensions */ struct { int arr[1][5][3][1][1][3][6][1]; - } *mem3_buffer = NULL; + } *mem3_buffer = NULL; hsize_t mem3_dims[8] = {1, 5, 3, 1, 1, 3, 6, 1}; hsize_t mem3_start[8] = {0, 0, 0, 0, 0, 0, 0, 0}; hsize_t mem3_count[8] = {1, 1, 1, 1, 1, 1, 1, 1}; @@ -416,7 +416,7 @@ test_multiple_ends(hid_t file, bool is_chunked) /* For testing the full selections in the fastest-growing end and the slowest-growing end */ struct { int arr[4][5][1][1][1][1][6][2]; - } *mem4_buffer = NULL; + } *mem4_buffer = NULL; hsize_t mem4_dims[8] = {4, 5, 1, 1, 1, 1, 6, 2}; hsize_t mem4_start[8] = {0, 0, 0, 0, 0, 0, 0, 0}; hsize_t mem4_count[8] = {1, 1, 1, 1, 1, 1, 1, 1}; @@ -427,7 +427,7 @@ test_multiple_ends(hid_t file, bool is_chunked) * also in the middle dimensions */ struct { int arr[4][5][1][4][2][1][6][2]; - } *mem5_buffer = NULL; + } *mem5_buffer = NULL; hsize_t mem5_dims[8] = {4, 5, 1, 4, 2, 1, 6, 2}; hsize_t mem5_start[8] = {0, 0, 0, 0, 0, 0, 0, 0}; hsize_t mem5_count[8] = {1, 1, 1, 1, 1, 1, 1, 1}; diff --git a/test/testframe.c b/test/testframe.c index dd5a7bb8dce..fe84e3e17a3 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -22,11 +22,11 @@ */ typedef struct TestStruct { - char Name[MAXTESTNAME]; - char Description[MAXTESTDESC]; - void (*TestFunc)(const void *); - void (*TestSetupFunc)(void *); - void (*TestCleanupFunc)(void *); + char Name[MAXTESTNAME]; + char Description[MAXTESTDESC]; + void (*TestFunc)(const void *); + void (*TestSetupFunc)(void *); + void (*TestCleanupFunc)(void *); void *TestParameters; int TestNumErrors; int TestSkipFlag; @@ -40,9 +40,9 @@ static TestStruct *TestArray = NULL; /* Array of tests */ static unsigned TestAlloc = 0; /* Size of the Test array */ static unsigned TestCount = 0; /* Number of tests currently added to test array */ -static const char *TestProgName = NULL; -static void (*TestPrivateUsage_g)(FILE *stream) = NULL; -static herr_t (*TestPrivateParser_g)(int argc, char *argv[]) = NULL; +static const char *TestProgName = NULL; +static void (*TestPrivateUsage_g)(FILE *stream) = NULL; +static herr_t (*TestPrivateParser_g)(int argc, char *argv[]) = NULL; static int TestNumErrs_g = 0; /* Total number of errors that occurred for whole test program */ static bool TestEnableErrorStack = true; /* Whether to show error stacks from the library */ diff --git a/test/tmeta.c b/test/tmeta.c index 3c0523db55f..2e3978a2c38 100644 --- a/test/tmeta.c +++ b/test/tmeta.c @@ -28,18 +28,18 @@ static uint8_t compar_buffer[] = { /* Little-endian encoded version of the 16-bit signed integer */ - (uint8_t)((TEST_INT16_VALUE)&0xff), + (uint8_t)((TEST_INT16_VALUE) & 0xff), (uint8_t)((TEST_INT16_VALUE >> 8) & 0xff), /* Little-endian encoded version of the 16-bit unsigned integer */ - (uint8_t)((TEST_UINT16_VALUE)&0xff), + (uint8_t)((TEST_UINT16_VALUE) & 0xff), (uint8_t)((TEST_UINT16_VALUE >> 8) & 0xff), /* Little-endian encoded version of the 32-bit signed integer */ - (uint8_t)((TEST_INT32_VALUE)&0xff), + (uint8_t)((TEST_INT32_VALUE) & 0xff), (uint8_t)((TEST_INT32_VALUE >> 8) & 0xff), (uint8_t)((TEST_INT32_VALUE >> 16) & 0xff), (uint8_t)((TEST_INT32_VALUE >> 24) & 0xff), /* Little-endian encoded version of the 32-bit unsigned integer */ - (uint8_t)((TEST_UINT32_VALUE)&0xff), + (uint8_t)((TEST_UINT32_VALUE) & 0xff), (uint8_t)((TEST_UINT32_VALUE >> 8) & 0xff), (uint8_t)((TEST_UINT32_VALUE >> 16) & 0xff), (uint8_t)((TEST_UINT32_VALUE >> 24) & 0xff), diff --git a/test/tskiplist.c b/test/tskiplist.c index 39f35153105..53d0d958645 100644 --- a/test/tskiplist.c +++ b/test/tskiplist.c @@ -529,9 +529,9 @@ test_skiplist_string(void) const char *s; } string_node; string_node data[10] = {{10, "10"}, {20, "20"}, {15, "15"}, {5, "05"}, {50, "50"}, - {30, "30"}, {31, "31"}, {32, "32"}, {80, "80"}, {90, "90"}}; + {30, "30"}, {31, "31"}, {32, "32"}, {80, "80"}, {90, "90"}}; string_node hashed_data[10] = {{5, "05"}, {10, "10"}, {15, "15"}, {20, "20"}, {30, "30"}, - {31, "31"}, {32, "32"}, {50, "50"}, {80, "80"}, {90, "90"}}; + {31, "31"}, {32, "32"}, {50, "50"}, {80, "80"}, {90, "90"}}; string_node *found_item; /* Item found in skip list */ herr_t ret; /* Generic return value */ @@ -753,9 +753,9 @@ test_skiplist_obj(void) size_t num; /* Number of elements in skip list */ size_t u; /* Local index variable */ H5_obj_t data[10] = {{10, 12}, {20, 12}, {10, 32}, {10, 11}, {50, 1}, - {8, 12}, {31, 12}, {20, 11}, {31, 11}, {8, 32}}; + {8, 12}, {31, 12}, {20, 11}, {31, 11}, {8, 32}}; H5_obj_t sorted_data[10] = {{8, 12}, {8, 32}, {10, 11}, {10, 12}, {10, 32}, - {20, 11}, {20, 12}, {31, 11}, {31, 12}, {50, 1}}; + {20, 11}, {20, 12}, {31, 11}, {31, 12}, {50, 1}}; H5_obj_t *found_item; /* Item found in skip list */ herr_t ret; /* Generic return value */ @@ -834,9 +834,9 @@ test_skiplist_generic(void) size_t num; /* Number of elements in skip list */ size_t u; /* Local index variable */ generic_t data[10] = {{10, 1}, {20, 13}, {15, 32}, {5, 2}, {50, 37}, - {30, 100}, {31, 38}, {32, 34}, {80, 32}, {90, 0}}; + {30, 100}, {31, 38}, {32, 34}, {80, 32}, {90, 0}}; generic_t sorted_data[10] = {{30, 100}, {15, 32}, {31, 38}, {32, 34}, {5, 2}, - {20, 13}, {10, 1}, {50, 37}, {80, 32}, {90, 0}}; + {20, 13}, {10, 1}, {50, 37}, {80, 32}, {90, 0}}; generic_t *found_item; /* Item found in skip list */ herr_t ret; /* Generic return value */ diff --git a/test/tsohm.c b/test/tsohm.c index 82581c2fd77..b054e6d170c 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -71,8 +71,8 @@ typedef struct dtype1_struct { #define DTYPE2_SIZE 1024 static const char *DSETNAME[] = {"dataset0", "dataset1", "dataset2", "dataset3", "dataset4", - "dataset5", "dataset6", "dataset7", "dataset8", "dataset9", - "dataset10", "dataset11", NULL}; + "dataset5", "dataset6", "dataset7", "dataset8", "dataset9", + "dataset10", "dataset11", NULL}; static const char *EXTRA_DSETNAME[] = {"ex_dataset0", "ex_dataset1", "ex_dataset2", "ex_dataset3", "ex_dataset4", "ex_dataset5", "ex_dataset6", "ex_dataset7", "ex_dataset8", @@ -94,7 +94,7 @@ static const char *ENUM_NAME[] = {"enum_member0", "enum_member1", "enum_member "enum_member15", "enum_member16", "enum_member17", "enum_member18", "enum_member19", NULL}; static const int ENUM_VAL[] = {0, 13, -500, 63, 64, -64, 65, 2048, 1, 2, -1, - 7, 130, -5000, 630, 640, -640, 650, 20480, 10, -1001, -10}; + 7, 130, -5000, 630, 640, -640, 650, 20480, 10, -1001, -10}; #define SIZE2_RANK1 6 #define SIZE2_RANK2 10 #define SIZE2_DIMS \ diff --git a/test/tvltypes.c b/test/tvltypes.c index ac3e13fdc53..8277337c27e 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -2542,7 +2542,7 @@ test_vltypes_fill_value(void) 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.0, 100.0, 1.0, "liquid", "meter"}; + 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 */ diff --git a/test/unlink.c b/test/unlink.c index 42a03ac94d4..914b434bae7 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -529,7 +529,7 @@ test_filespace(hid_t fapl) char objname[128]; /* Name of object to create */ hsize_t dims[FILESPACE_NDIMS] = {FILESPACE_DIM0, FILESPACE_DIM1, FILESPACE_DIM2}; /* Dataset dimensions */ hsize_t chunk_dims[FILESPACE_NDIMS] = {FILESPACE_CHUNK0, FILESPACE_CHUNK1, - FILESPACE_CHUNK2}; /* Chunk dimensions */ + FILESPACE_CHUNK2}; /* Chunk dimensions */ hsize_t attr_dims[FILESPACE_ATTR_NDIMS] = {FILESPACE_ATTR_DIM0, FILESPACE_ATTR_DIM1}; /* Attribute dimensions */ int *data = NULL; /* Pointer to dataset buffer */ diff --git a/test/vds.c b/test/vds.c index 8dafc5c6890..3d2f41eac05 100644 --- a/test/vds.c +++ b/test/vds.c @@ -522,7 +522,7 @@ test_api(test_api_config_t config, hid_t fapl, H5F_libver_t low) hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */ hid_t ex_dcpl = H5I_INVALID_HID; /* Temporary dcpl for examination */ hid_t srcspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Source dataspaces */ + H5I_INVALID_HID}; /* Source dataspaces */ hid_t vspace[LIST_DOUBLE_SIZE]; /* Virtual dset dataspaces */ const char *src_file[4] = {"src_file1", "src_file2.", "src_file3..", "src_file4..."}; /* Source file names (different lengths) */ @@ -1188,17 +1188,17 @@ test_vds_prefix_first(unsigned config, hid_t vds_fapl, hid_t src_fapl) char *srcfilenamepct_map = NULL; const char *srcfilenamepct_map_orig = "vds%%%%_src"; hid_t srcfile[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Files with source dsets */ + H5I_INVALID_HID}; /* Files with source dsets */ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */ hid_t dapl = H5I_INVALID_HID; /* Dataset access property list */ hid_t srcspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Source dataspaces */ + H5I_INVALID_HID}; /* Source dataspaces */ hid_t vspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Virtual dset dataspaces */ + H5I_INVALID_HID}; /* Virtual dset dataspaces */ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */ hid_t srcdset[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Source datasets */ + H5I_INVALID_HID}; /* Source datasets */ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */ hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */ int buf[10][26]; /* Write and expected read buffer */ @@ -1471,17 +1471,17 @@ test_basic_io(unsigned config, hid_t vds_fapl, hid_t src_fapl) char *srcfilenamepct_map = NULL; const char *srcfilenamepct_map_orig = "vds%%%%_src"; hid_t srcfile[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Files with source dsets */ + H5I_INVALID_HID}; /* Files with source dsets */ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */ hid_t vfile2 = H5I_INVALID_HID; /* File with copied virtual dset */ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */ hid_t srcspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Source dataspaces */ + H5I_INVALID_HID}; /* Source dataspaces */ hid_t vspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Virtual dset dataspaces */ + H5I_INVALID_HID}; /* Virtual dset dataspaces */ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */ hid_t srcdset[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Source datasets */ + H5I_INVALID_HID}; /* Source datasets */ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */ hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */ hsize_t start[4]; /* Hyperslab start */ @@ -4401,19 +4401,19 @@ test_unlim(unsigned config, hid_t vds_fapl, hid_t src_fapl) char srcfilename_map[FILENAME_BUF_SIZE]; char vfilename[FILENAME_BUF_SIZE]; hid_t srcfile[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Files with source dsets */ + H5I_INVALID_HID}; /* Files with source dsets */ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */ hid_t srcdcpl = H5I_INVALID_HID; /* DCPL for source dset */ hid_t dapl = H5I_INVALID_HID; /* Dataset access property list */ hid_t srcspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Source dataspaces */ + H5I_INVALID_HID}; /* Source dataspaces */ hid_t vspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Virtual dset dataspaces */ + H5I_INVALID_HID}; /* Virtual dset dataspaces */ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */ hid_t filespace = H5I_INVALID_HID; /* File dataspace */ hid_t srcdset[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Source datasets */ + H5I_INVALID_HID}; /* Source datasets */ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */ hsize_t dims[2] = {10, 10}; /* Data space current size */ hsize_t mdims[2] = {10, 20}; /* Data space maximum size */ @@ -7420,7 +7420,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl) const char *printf_srcfilename_map_orig = "vds_src_%b"; const char *srcfilenamepct_map_orig = "vds%%%%_src"; hid_t srcfile[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Files with source dsets */ + H5I_INVALID_HID}; /* Files with source dsets */ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */ hid_t dapl = H5I_INVALID_HID; /* Dataset access property list */ @@ -7429,7 +7429,7 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl) hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */ hid_t filespace = H5I_INVALID_HID; /* File dataspace */ hid_t srcdset[6] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID}; /* Source datasets */ + H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID}; /* Source datasets */ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */ hsize_t dims[2] = {10, 0}; /* Data space current size */ hsize_t mdims[2] = {10, 20}; /* Data space maximum size */ @@ -11140,7 +11140,7 @@ test_all(unsigned config, hid_t vds_fapl, hid_t src_fapl) hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */ hid_t filespace = H5I_INVALID_HID; /* File dataspace */ hid_t srcdset[5] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Source datasets */ + H5I_INVALID_HID}; /* Source datasets */ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */ hsize_t dims[2] = {6, 6}; /* Data space current size */ hsize_t mdims[2] = {10, 10}; /* Data space maximum size */ diff --git a/test/vds_env.c b/test/vds_env.c index 9e24067d75a..757732adaf9 100644 --- a/test/vds_env.c +++ b/test/vds_env.c @@ -49,17 +49,17 @@ test_vds_prefix_second(unsigned config, hid_t fapl) char *srcfilenamepct = NULL; char *srcfilenamepct_map = NULL; hid_t srcfile[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Files with source dsets */ + H5I_INVALID_HID}; /* Files with source dsets */ hid_t vfile = H5I_INVALID_HID; /* File with virtual dset */ hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */ hid_t dapl = H5I_INVALID_HID; /* Dataset access property list */ hid_t srcspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Source dataspaces */ + H5I_INVALID_HID}; /* Source dataspaces */ hid_t vspace[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Virtual dset dataspaces */ + H5I_INVALID_HID}; /* Virtual dset dataspaces */ hid_t memspace = H5I_INVALID_HID; /* Memory dataspace */ hid_t srcdset[4] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID}; /* Source datasets */ + H5I_INVALID_HID}; /* Source datasets */ hid_t vdset = H5I_INVALID_HID; /* Virtual dataset */ hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */ int buf[10][26]; /* Write and expected read buffer */ diff --git a/testpar/API/H5_api_async_test_parallel.c b/testpar/API/H5_api_async_test_parallel.c index 768bbc2ab07..e8a792702fb 100644 --- a/testpar/API/H5_api_async_test_parallel.c +++ b/testpar/API/H5_api_async_test_parallel.c @@ -434,7 +434,7 @@ test_multi_dataset_io(void) hid_t file_id = H5I_INVALID_HID; hid_t fapl_id = H5I_INVALID_HID; hid_t dset_id[MULTI_DATASET_IO_TEST_NDSETS] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID, H5I_INVALID_HID}; + H5I_INVALID_HID, H5I_INVALID_HID}; hid_t space_id = H5I_INVALID_HID; hid_t mspace_id = H5I_INVALID_HID; hid_t es_id = H5I_INVALID_HID; @@ -758,9 +758,9 @@ test_multi_file_dataset_io(void) size_t i, j, data_size, num_in_progress; hid_t fapl_id = H5I_INVALID_HID; hid_t file_id[MULTI_FILE_DATASET_IO_TEST_NFILES] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID, H5I_INVALID_HID}; + H5I_INVALID_HID, H5I_INVALID_HID}; hid_t dset_id[MULTI_FILE_DATASET_IO_TEST_NFILES] = {H5I_INVALID_HID, H5I_INVALID_HID, H5I_INVALID_HID, - H5I_INVALID_HID, H5I_INVALID_HID}; + H5I_INVALID_HID, H5I_INVALID_HID}; hid_t space_id = H5I_INVALID_HID; hid_t mspace_id = H5I_INVALID_HID; hid_t es_id = H5I_INVALID_HID; diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 17ae47c4531..5d0b9dc1a2f 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -1068,7 +1068,7 @@ setup_derived_types(void) int i; int result; MPI_Datatype mpi_types[9] = {MPI_INT, MPI_INT, MPI_INT, MPI_LONG, HADDR_AS_MPI_TYPE, - MPI_INT, MPI_INT, MPI_UNSIGNED, MPI_UNSIGNED}; + MPI_INT, MPI_INT, MPI_UNSIGNED, MPI_UNSIGNED}; int block_len[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1}; MPI_Aint displs[9]; struct mssg_t sample; /* used to compute displacements */ @@ -6037,57 +6037,57 @@ trace_file_check(int metadata_write_strategy) const char *((*expected_output)[]) = NULL; const char *expected_output_0[] = {"### HDF5 metadata cache trace file version 1 ###\n", - "H5AC_set_cache_auto_resize_config", - "H5AC_insert_entry", - "H5AC_insert_entry", - "H5AC_insert_entry", - "H5AC_insert_entry", - "H5AC_protect", - "H5AC_mark_entry_dirty", - "H5AC_unprotect", - "H5AC_protect", - "H5AC_pin_protected_entry", - "H5AC_unprotect", - "H5AC_unpin_entry", - "H5AC_expunge_entry", - "H5AC_protect", - "H5AC_pin_protected_entry", - "H5AC_unprotect", - "H5AC_mark_entry_dirty", - "H5AC_resize_entry", - "H5AC_resize_entry", - "H5AC_unpin_entry", - "H5AC_move_entry", - "H5AC_move_entry", - "H5AC_flush", - "H5AC_flush", - NULL}; + "H5AC_set_cache_auto_resize_config", + "H5AC_insert_entry", + "H5AC_insert_entry", + "H5AC_insert_entry", + "H5AC_insert_entry", + "H5AC_protect", + "H5AC_mark_entry_dirty", + "H5AC_unprotect", + "H5AC_protect", + "H5AC_pin_protected_entry", + "H5AC_unprotect", + "H5AC_unpin_entry", + "H5AC_expunge_entry", + "H5AC_protect", + "H5AC_pin_protected_entry", + "H5AC_unprotect", + "H5AC_mark_entry_dirty", + "H5AC_resize_entry", + "H5AC_resize_entry", + "H5AC_unpin_entry", + "H5AC_move_entry", + "H5AC_move_entry", + "H5AC_flush", + "H5AC_flush", + NULL}; const char *expected_output_1[] = {"### HDF5 metadata cache trace file version 1 ###\n", - "H5AC_set_cache_auto_resize_config", - "H5AC_insert_entry", - "H5AC_insert_entry", - "H5AC_insert_entry", - "H5AC_insert_entry", - "H5AC_protect", - "H5AC_mark_entry_dirty", - "H5AC_unprotect", - "H5AC_protect", - "H5AC_pin_protected_entry", - "H5AC_unprotect", - "H5AC_unpin_entry", - "H5AC_expunge_entry", - "H5AC_protect", - "H5AC_pin_protected_entry", - "H5AC_unprotect", - "H5AC_mark_entry_dirty", - "H5AC_resize_entry", - "H5AC_resize_entry", - "H5AC_unpin_entry", - "H5AC_move_entry", - "H5AC_move_entry", - "H5AC_flush", - "H5AC_flush", - NULL}; + "H5AC_set_cache_auto_resize_config", + "H5AC_insert_entry", + "H5AC_insert_entry", + "H5AC_insert_entry", + "H5AC_insert_entry", + "H5AC_protect", + "H5AC_mark_entry_dirty", + "H5AC_unprotect", + "H5AC_protect", + "H5AC_pin_protected_entry", + "H5AC_unprotect", + "H5AC_unpin_entry", + "H5AC_expunge_entry", + "H5AC_protect", + "H5AC_pin_protected_entry", + "H5AC_unprotect", + "H5AC_mark_entry_dirty", + "H5AC_resize_entry", + "H5AC_resize_entry", + "H5AC_unpin_entry", + "H5AC_move_entry", + "H5AC_move_entry", + "H5AC_flush", + "H5AC_flush", + NULL}; char buffer[256]; char trace_file_name[64]; bool done = false; diff --git a/testpar/t_coll_md.c b/testpar/t_coll_md.c index f87e357dc1a..078a561279e 100644 --- a/testpar/t_coll_md.c +++ b/testpar/t_coll_md.c @@ -70,7 +70,7 @@ test_partial_no_selection_coll_md_read(const void *params) hsize_t max_dataset_dims[PARTIAL_NO_SELECTION_DATASET_NDIMS]; hsize_t sel_dims[1]; hsize_t chunk_dims[PARTIAL_NO_SELECTION_DATASET_NDIMS] = {PARTIAL_NO_SELECTION_Y_DIM_SCALE, - PARTIAL_NO_SELECTION_X_DIM_SCALE}; + PARTIAL_NO_SELECTION_X_DIM_SCALE}; hsize_t start[PARTIAL_NO_SELECTION_DATASET_NDIMS]; hsize_t stride[PARTIAL_NO_SELECTION_DATASET_NDIMS]; hsize_t count[PARTIAL_NO_SELECTION_DATASET_NDIMS]; diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index 55e1758c3a0..ae7ecde133e 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -1897,7 +1897,7 @@ io_mode_confusion(const void *params) const char *dataset_name[NUM_DATA_SETS] = {"dataset_0", "dataset_1", "dataset_2", "dataset_3"}; const char *att_name[NUM_DATA_SETS] = {"attribute_0", "attribute_1", "attribute_2", "attribute_3"}; const char *lg_att_name[NUM_DATA_SETS] = {"large_attribute_0", "large_attribute_1", "large_attribute_2", - "large_attribute_3"}; + "large_attribute_3"}; void rr_obj_hdr_flush_confusion(const void *params) diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index 017e0625521..4376184e43d 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -701,7 +701,7 @@ trav_table_addlink(trav_table_t *table, const H5O_token_t *obj_token, const char if (table->objs[i].nlinks == (unsigned)table->objs[i].sizelinks) { table->objs[i].sizelinks = MAX(1, table->objs[i].sizelinks * 2); table->objs[i].links = (trav_link_t *)realloc( - table->objs[i].links, table->objs[i].sizelinks * sizeof(trav_link_t)); + table->objs[i].links, table->objs[i].sizelinks * sizeof(trav_link_t)); } /* end if */ /* insert it */ diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c index 03c595f66cb..bfe62506b25 100644 --- a/tools/libtest/h5tools_test_utils.c +++ b/tools/libtest/h5tools_test_utils.c @@ -674,8 +674,8 @@ test_populate_ros3_fa(void) { H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"}; const char *values[] = {"somewhere over the rainbow not too high " - "there is another rainbow bounding some darkened sky", - "y", "z", ""}; + "there is another rainbow bounding some darkened sky", + "y", "z", ""}; if (show_progress) { printf("region overflow\n"); @@ -738,17 +738,17 @@ test_populate_ros3_fa(void) { H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"}; const char *values[] = {"x", - "Why is it necessary to solve the problem? " - "What benefits will you receive by solving the problem? " - "What is the unknown? " - "What is it you don't yet understand? " - "What is the information you have? " - "What isn't the problem? " - "Is the information insufficient, redundant, or contradictory? " - "Should you draw a diagram or figure of the problem? " - "What are the boundaries of the problem? " - "Can you separate the various parts of the problem?", - "z", ""}; + "Why is it necessary to solve the problem? " + "What benefits will you receive by solving the problem? " + "What is the unknown? " + "What is it you don't yet understand? " + "What is the information you have? " + "What isn't the problem? " + "Is the information insufficient, redundant, or contradictory? " + "Should you draw a diagram or figure of the problem? " + "What are the boundaries of the problem? " + "Can you separate the various parts of the problem?", + "z", ""}; if (show_progress) { printf("id overflow\n"); @@ -871,17 +871,17 @@ test_populate_ros3_fa(void) { H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"}; const char *values[] = {"x", "y", - "Why is it necessary to solve the problem? " - "What benefits will you receive by solving the problem? " - "What is the unknown? " - "What is it you don't yet understand? " - "What is the information you have? " - "What isn't the problem? " - "Is the information insufficient, redundant, or contradictory? " - "Should you draw a diagram or figure of the problem? " - "What are the boundaries of the problem? " - "Can you separate the various parts of the problem?", - ""}; + "Why is it necessary to solve the problem? " + "What benefits will you receive by solving the problem? " + "What is the unknown? " + "What is it you don't yet understand? " + "What is the information you have? " + "What isn't the problem? " + "Is the information insufficient, redundant, or contradictory? " + "Should you draw a diagram or figure of the problem? " + "What are the boundaries of the problem? " + "Can you separate the various parts of the problem?", + ""}; if (show_progress) { printf("key overflow\n"); @@ -903,7 +903,7 @@ test_populate_ros3_fa(void) { H5FD_ros3_fapl_ext_t fa = {{0, 0, "", "", ""}, ""}; const char *values[] = {"us-east-2", "AKIAIMC3D3XLYXLN5COA", - "ugs5aVVnLFCErO/8uW14iWE3K5AgXMpsMlWneO/+", ""}; + "ugs5aVVnLFCErO/8uW14iWE3K5AgXMpsMlWneO/+", ""}; JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, values), "unable to set use case") JSVERIFY(1, fa.fa.version, "version check") JSVERIFY(1, fa.fa.authenticate, "should authenticate") diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c index ef7e36f6532..a4d4027121d 100644 --- a/tools/src/h5copy/h5copy.c +++ b/tools/src/h5copy/h5copy.c @@ -20,16 +20,16 @@ /* command-line options: short and long-named parameters */ static const char *s_opts = "d:f:hi:o:ps:vVE*"; static struct h5_long_options l_opts[] = {{"destination", require_arg, 'd'}, - {"flag", require_arg, 'f'}, - {"help", no_arg, 'h'}, - {"input", require_arg, 'i'}, - {"output", require_arg, 'o'}, - {"parents", no_arg, 'p'}, - {"source", require_arg, 's'}, - {"verbose", no_arg, 'v'}, - {"version", no_arg, 'V'}, - {"enable-error-stack", optional_arg, 'E'}, - {NULL, 0, '\0'}}; + {"flag", require_arg, 'f'}, + {"help", no_arg, 'h'}, + {"input", require_arg, 'i'}, + {"output", require_arg, 'o'}, + {"parents", no_arg, 'p'}, + {"source", require_arg, 's'}, + {"verbose", no_arg, 'v'}, + {"version", no_arg, 'V'}, + {"enable-error-stack", optional_arg, 'E'}, + {NULL, 0, '\0'}}; static char *fname_src = NULL; static char *fname_dst = NULL; static char *oname_src = NULL; diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 6f37c1bc2be..77d68e3f8e2 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -86,7 +86,7 @@ static void init_prefix(char **prfx, size_t prfx_len); /* a structure for handling the order command-line parameters come in */ struct handler_t { - void (*func)(hid_t, const char *, void *, int, const char *); + void (*func)(hid_t, const char *, void *, int, const char *); char *obj; struct subset_t *subset_info; }; diff --git a/tools/src/h5dump/h5dump.h b/tools/src/h5dump/h5dump.h index f50950b5548..3829ea3d8a0 100644 --- a/tools/src/h5dump/h5dump.h +++ b/tools/src/h5dump/h5dump.h @@ -206,13 +206,13 @@ **/ /* the table of dump functions */ typedef struct dump_functions_t { - void (*dump_group_function)(hid_t, const char *); - void (*dump_named_datatype_function)(hid_t, const char *); - void (*dump_dataset_function)(hid_t, const char *, struct subset_t *); - void (*dump_dataspace_function)(hid_t); - void (*dump_datatype_function)(hid_t); + void (*dump_group_function)(hid_t, const char *); + void (*dump_named_datatype_function)(hid_t, const char *); + void (*dump_dataset_function)(hid_t, const char *, struct subset_t *); + void (*dump_dataspace_function)(hid_t); + void (*dump_datatype_function)(hid_t); herr_t (*dump_attribute_function)(hid_t, const char *, const H5A_info_t *, void *); - void (*dump_data_function)(hid_t, int, struct subset_t *, int); + void (*dump_data_function)(hid_t, int, struct subset_t *, int); } dump_functions; /* List of table structures. There is one table structure for each file */ diff --git a/tools/src/h5dump/h5dump_extern.h b/tools/src/h5dump/h5dump_extern.h index 723a39edc4c..bc4c3017ae1 100644 --- a/tools/src/h5dump/h5dump_extern.h +++ b/tools/src/h5dump/h5dump_extern.h @@ -25,13 +25,13 @@ **/ /* the table of dump functions */ typedef struct dump_functions_t { - void (*dump_group_function)(hid_t, const char *); - void (*dump_named_datatype_function)(hid_t, const char *); - void (*dump_dataset_function)(hid_t, const char *, struct subset_t *); - void (*dump_dataspace_function)(hid_t); - void (*dump_datatype_function)(hid_t); + void (*dump_group_function)(hid_t, const char *); + void (*dump_named_datatype_function)(hid_t, const char *); + void (*dump_dataset_function)(hid_t, const char *, struct subset_t *); + void (*dump_dataspace_function)(hid_t); + void (*dump_datatype_function)(hid_t); herr_t (*dump_attribute_function)(hid_t, const char *, const H5A_info_t *, void *); - void (*dump_data_function)(hid_t, int, struct subset_t *, int); + void (*dump_data_function)(hid_t, int, struct subset_t *, int); } dump_functions; /* List of table structures. There is one table structure for each file */ @@ -44,7 +44,7 @@ typedef struct h5dump_table_list_t { table_t *group_table; /* Table of groups */ table_t *dset_table; /* Table of datasets */ table_t *type_table; /* Table of datatypes */ - } * tables; + } *tables; } h5dump_table_list_t; extern h5dump_table_list_t table_list; diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 3e9255019ca..c7f5d4a58de 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -135,10 +135,10 @@ static bool display_root_g = false; /* show root group in output? */ /* Information about how to display each type of object */ static struct dispatch_t { const char *name; - hid_t (*open)(hid_t loc, const char *name, hid_t apl_id); - herr_t (*close)(hid_t obj); - herr_t (*list1)(hid_t obj); - herr_t (*list2)(hid_t obj, const char *name); + hid_t (*open)(hid_t loc, const char *name, hid_t apl_id); + herr_t (*close)(hid_t obj); + herr_t (*list1)(hid_t obj); + herr_t (*list2)(hid_t obj, const char *name); } dispatch_g[H5O_TYPE_NTYPES]; #define DISPATCH(TYPE, NAME, LIST1, LIST2) \ diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index e595dd34c0d..351e4153571 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -5697,13 +5697,13 @@ test_objs_strings(const char *fname1, const char *fname2) hsize_t dims2[] = {20}; char string2A[20][10] = {"ab cd ef1", "ab cd ef2", "ab cd ef3", "ab cd ef4", "ab cd ef5", - "ab cd ef6", "ab cd ef7", "ab cd ef8", "ab cd 9", "ab cd 0", - "ab cd 1", "ab cd 2", "ab cd ef3", "ab cd ef4", "ab cd ef5", - "ab cd ef6", "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0"}; + "ab cd ef6", "ab cd ef7", "ab cd ef8", "ab cd 9", "ab cd 0", + "ab cd 1", "ab cd 2", "ab cd ef3", "ab cd ef4", "ab cd ef5", + "ab cd ef6", "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0"}; char string2B[20][10] = {"ab cd ef1", "ab cd ef2", "ab cd ef3", "ab cd ef4", "ab cd ef5", - "ab cd ef6", "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0", - "ab cd ef1", "ab cd ef2", "ab cd 3", "ab cd 4", "ab cd 5", - "ab cd 6", "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0"}; + "ab cd ef6", "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0", + "ab cd ef1", "ab cd ef2", "ab cd 3", "ab cd 4", "ab cd 5", + "ab cd 6", "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0"}; hsize_t dims3[] = {27}; char string3A[27][6] = {"abcd0", "abcd1", "abcd2", "abcd3", "abcd4", "abcd5", "abcd6", "abcd7", "abcd8", @@ -5885,9 +5885,9 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid, /* create 3D attributes with dimension [4][3][2], 24 elements */ hsize_t dims3[3] = {4, 3, 2}; char buf13[4][3][2][STR_SIZE] = {{{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}, - {{"mn", "pq"}, {"rs", "tu"}, {"vw", "xz"}}, - {{"AB", "CD"}, {"EF", "GH"}, {"IJ", "KL"}}, - {{"MN", "PQ"}, {"RS", "TU"}, {"VW", "XZ"}}}; /* string */ + {{"mn", "pq"}, {"rs", "tu"}, {"vw", "xz"}}, + {{"AB", "CD"}, {"EF", "GH"}, {"IJ", "KL"}}, + {{"MN", "PQ"}, {"RS", "TU"}, {"VW", "XZ"}}}; /* string */ char *buf13a[4][3][2]; /* VL string */ char buf23[4][3][2]; /* bitfield, opaque */ s_t buf33[4][3][2]; /* compound */ @@ -6874,9 +6874,9 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid, /* create 3D attributes with dimension [4][3][2], 24 elements */ hsize_t dims3[3] = {4, 3, 2}; char buf13[4][3][2][STR_SIZE] = {{{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}, - {{"mn", "pq"}, {"rs", "tu"}, {"vw", "xz"}}, - {{"AB", "CD"}, {"EF", "GH"}, {"IJ", "KL"}}, - {{"MN", "PQ"}, {"RS", "TU"}, {"VW", "XZ"}}}; /* string */ + {{"mn", "pq"}, {"rs", "tu"}, {"vw", "xz"}}, + {{"AB", "CD"}, {"EF", "GH"}, {"IJ", "KL"}}, + {{"MN", "PQ"}, {"RS", "TU"}, {"VW", "XZ"}}}; /* string */ char *buf13a[4][3][2]; /* VL string */ char buf23[4][3][2]; /* bitfield, opaque */ s_t buf33[4][3][2]; /* compound */ @@ -7865,9 +7865,9 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid, /* create 3D attributes with dimension [4][3][2], 24 elements */ hsize_t dims3[3] = {4, 3, 2}; char buf13[4][3][2][STR_SIZE] = {{{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}, - {{"mn", "pq"}, {"rs", "tu"}, {"vw", "xz"}}, - {{"AB", "CD"}, {"EF", "GH"}, {"IJ", "KL"}}, - {{"MN", "PQ"}, {"RS", "TU"}, {"VW", "XZ"}}}; /* string */ + {{"mn", "pq"}, {"rs", "tu"}, {"vw", "xz"}}, + {{"AB", "CD"}, {"EF", "GH"}, {"IJ", "KL"}}, + {{"MN", "PQ"}, {"RS", "TU"}, {"VW", "XZ"}}}; /* string */ char *buf13a[4][3][2]; /* VL string */ char buf23[4][3][2]; /* bitfield, opaque */ s_t buf33[4][3][2]; /* compound */ diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 55014aeeecf..1af7d721254 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -1797,14 +1797,14 @@ gent_str(void) hsize_t dims2[] = {20}; char string2[20][10] = {"ab cd ef1", "ab cd ef2", "ab cd ef3", "ab cd ef4", "ab cd ef5", - "ab cd ef6", "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0", - "ab cd ef1", "ab cd ef2", "ab cd ef3", "ab cd ef4", "ab cd ef5", - "ab cd ef6", "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0"}; + "ab cd ef6", "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0", + "ab cd ef1", "ab cd ef2", "ab cd ef3", "ab cd ef4", "ab cd ef5", + "ab cd ef6", "ab cd ef7", "ab cd ef8", "ab cd ef9", "ab cd ef0"}; hsize_t dims3[] = {27}; char string3[27][6] = {"abcd0", "abcd1", "abcd2", "abcd3", "abcd4", "abcd5", "abcd6", "abcd7", "abcd8", - "abcd9", "abcd0", "abcd1", "abcd2", "abcd3", "abcd4", "abcd5", "abcd6", "abcd7", - "abcd8", "abcd9", "abcd0", "abcd1", "abcd2", "abcd3", "abcd4", "abcd5", "abcd6"}; + "abcd9", "abcd0", "abcd1", "abcd2", "abcd3", "abcd4", "abcd5", "abcd6", "abcd7", + "abcd8", "abcd9", "abcd0", "abcd1", "abcd2", "abcd3", "abcd4", "abcd5", "abcd6"}; int i, j, k, l; @@ -2097,7 +2097,7 @@ gent_enum(void) hid_t file, type, space, dset; int val; enumtype data[] = {RED, GREEN, BLUE, GREEN, WHITE, WHITE, BLACK, GREEN, BLUE, RED, - RED, BLUE, GREEN, BLACK, WHITE, RED, WHITE, GREEN, GREEN, BLUE}; + RED, BLUE, GREEN, BLACK, WHITE, RED, WHITE, GREEN, GREEN, BLUE}; hsize_t size[1] = {NELMTS(data)}; file = H5Fcreate(FILE15, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -7263,31 +7263,31 @@ gent_packedbits(void) struct { uint8_t arr[F66_XDIM][F66_YDIM8]; - } * dsetu8; + } *dsetu8; struct { uint16_t arr[F66_XDIM][F66_YDIM16]; - } * dsetu16; + } *dsetu16; struct { uint32_t arr[F66_XDIM][F66_YDIM32]; - } * dsetu32; + } *dsetu32; struct { uint64_t arr[F66_XDIM][F66_YDIM64]; - } * dsetu64; + } *dsetu64; struct { int8_t arr[F66_XDIM][F66_YDIM8]; - } * dset8; + } *dset8; struct { int16_t arr[F66_XDIM][F66_YDIM16]; - } * dset16; + } *dset16; struct { int32_t arr[F66_XDIM][F66_YDIM32]; - } * dset32; + } *dset32; struct { int64_t arr[F66_XDIM][F66_YDIM64]; - } * dset64; + } *dset64; struct { double arr[F66_XDIM][F66_YDIM8]; - } * dsetdbl; + } *dsetdbl; uint8_t valu8bits; uint16_t valu16bits; @@ -7506,31 +7506,31 @@ gent_attr_intsize(void) struct { uint8_t arr[F66_XDIM][F66_YDIM8]; - } * dsetu8; + } *dsetu8; struct { uint16_t arr[F66_XDIM][F66_YDIM16]; - } * dsetu16; + } *dsetu16; struct { uint32_t arr[F66_XDIM][F66_YDIM32]; - } * dsetu32; + } *dsetu32; struct { uint64_t arr[F66_XDIM][F66_YDIM64]; - } * dsetu64; + } *dsetu64; struct { int8_t arr[F66_XDIM][F66_YDIM8]; - } * dset8; + } *dset8; struct { int16_t arr[F66_XDIM][F66_YDIM16]; - } * dset16; + } *dset16; struct { int32_t arr[F66_XDIM][F66_YDIM64]; - } * dset32; + } *dset32; struct { int64_t arr[F66_XDIM][F66_YDIM64]; - } * dset64; + } *dset64; struct { double arr[F66_XDIM][F66_YDIM8]; - } * dsetdbl; + } *dsetdbl; uint8_t valu8bits; uint16_t valu16bits; @@ -8621,31 +8621,31 @@ gent_intscalars(void) struct { uint8_t arr[F73_XDIM][F73_YDIM8]; - } * dsetu8; + } *dsetu8; struct { uint16_t arr[F73_XDIM][F73_YDIM16]; - } * dsetu16; + } *dsetu16; struct { uint32_t arr[F73_XDIM][F73_YDIM32]; - } * dsetu32; + } *dsetu32; struct { uint64_t arr[F73_XDIM][F73_YDIM64]; - } * dsetu64; + } *dsetu64; struct { int8_t arr[F73_XDIM][F73_YDIM8]; - } * dset8; + } *dset8; struct { int16_t arr[F73_XDIM][F73_YDIM16]; - } * dset16; + } *dset16; struct { int32_t arr[F73_XDIM][F73_YDIM32]; - } * dset32; + } *dset32; struct { int64_t arr[F73_XDIM][F73_YDIM64]; - } * dset64; + } *dset64; struct { double arr[F73_XDIM][F73_YDIM8]; - } * dsetdbl; + } *dsetdbl; uint8_t valu8bits; uint16_t valu16bits; @@ -8882,31 +8882,31 @@ gent_attr_intscalars(void) struct { uint8_t arr[F73_XDIM][F73_YDIM8]; - } * dsetu8; + } *dsetu8; struct { uint16_t arr[F73_XDIM][F73_YDIM16]; - } * dsetu16; + } *dsetu16; struct { uint32_t arr[F73_XDIM][F73_YDIM32]; - } * dsetu32; + } *dsetu32; struct { uint64_t arr[F73_XDIM][F73_YDIM64]; - } * dsetu64; + } *dsetu64; struct { int8_t arr[F73_XDIM][F73_YDIM8]; - } * dset8; + } *dset8; struct { int16_t arr[F73_XDIM][F73_YDIM16]; - } * dset16; + } *dset16; struct { int32_t arr[F73_XDIM][F73_YDIM32]; - } * dset32; + } *dset32; struct { int64_t arr[F73_XDIM][F73_YDIM64]; - } * dset64; + } *dset64; struct { double arr[F73_XDIM][F73_YDIM8]; - } * dsetdbl; + } *dsetdbl; uint8_t valu8bits; uint16_t valu16bits; @@ -9985,31 +9985,31 @@ gent_intsattrs(void) struct { uint8_t arr[F66_XDIM][F66_YDIM8]; - } * dsetu8; + } *dsetu8; struct { uint16_t arr[F66_XDIM][F66_YDIM16]; - } * dsetu16; + } *dsetu16; struct { uint32_t arr[F66_XDIM][F66_YDIM32]; - } * dsetu32; + } *dsetu32; struct { uint64_t arr[F66_XDIM][F66_YDIM64]; - } * dsetu64; + } *dsetu64; struct { int8_t arr[F66_XDIM][F66_YDIM8]; - } * dset8; + } *dset8; struct { int16_t arr[F66_XDIM][F66_YDIM16]; - } * dset16; + } *dset16; struct { int32_t arr[F66_XDIM][F66_YDIM32]; - } * dset32; + } *dset32; struct { int64_t arr[F66_XDIM][F66_YDIM64]; - } * dset64; + } *dset64; struct { double arr[F66_XDIM][F66_YDIM8]; - } * dsetdbl; + } *dsetdbl; uint8_t *asetu8 = NULL; uint16_t *asetu16 = NULL; @@ -10345,13 +10345,13 @@ gent_floatsattrs(void) struct { float arr[F89_XDIM][F89_YDIM32]; - } * dset32; + } *dset32; struct { double arr[F89_XDIM][F89_YDIM64]; - } * dset64; + } *dset64; struct { long double arr[F89_XDIM][F89_YDIM128]; - } * dset128; + } *dset128; float *aset32 = NULL; double *aset64 = NULL; @@ -10649,7 +10649,7 @@ gent_intsfourdims(void) hsize_t dims[F81_RANK]; struct { uint32_t arr[F81_ZDIM][F81_YDIM][F81_XDIM][F81_WDIM]; - } * dset1; + } *dset1; unsigned int i, j, k, l; fid = H5Fcreate(FILE81, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -10890,7 +10890,7 @@ gent_compound_complex2(void) buf[i].b[j] = (int)(j - i * 10); for (j = 0; j < dset_array_c_dims[0]; j++) for (k = 0; k < dset_array_c_dims[1]; k++) - buf[i].c[j][k] = (float)(j + k + i * 10) + (float)(j)*0.1F; + buf[i].c[j][k] = (float)(j + k + i * 10) + (float)(j) * 0.1F; /* Set up first nested compound */ buf[i].d.nested_a = (double)i; @@ -12025,7 +12025,7 @@ gent_float16(void) struct { H5__Float16 arr[F93_XDIM][F93_YDIM]; - } * dset16; + } *dset16; H5__Float16 *aset16 = NULL; H5__Float16 val16bits; @@ -12095,7 +12095,7 @@ gent_float16_be(void) struct { H5__Float16 arr[F94_XDIM][F94_YDIM]; - } * dset16; + } *dset16; H5__Float16 *aset16 = NULL; H5__Float16 val16bits; diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c index 892e9740d27..5bcd91f9774 100644 --- a/tools/test/misc/h5clear_gentest.c +++ b/tools/test/misc/h5clear_gentest.c @@ -62,7 +62,7 @@ gen_cache_image_file(const char *fname) int i, j; /* Local index variables */ struct { int arr[50][100]; - } * buf; /* Buffer for data to write */ + } *buf; /* Buffer for data to write */ H5AC_cache_image_config_t cache_image_config = /* Cache image input configuration */ {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, true, false, H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE}; diff --git a/tools/test/misc/h5perf_gentest.c b/tools/test/misc/h5perf_gentest.c index 77569144e84..b3f5bb722b4 100644 --- a/tools/test/misc/h5perf_gentest.c +++ b/tools/test/misc/h5perf_gentest.c @@ -151,16 +151,16 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz size_t offset, len; herr_t status; char *names[NTYPES] = {"int", - "ulong", - "float", - "double", - "fixed string", - "enum", - "fixed float array", - "vlen int array", - "vlen strings"}; + "ulong", + "float", + "double", + "fixed string", + "enum", + "fixed float array", + "vlen int array", + "vlen strings"}; hid_t types[NTYPES] = {H5T_NATIVE_INT, H5T_NATIVE_UINT64, H5T_NATIVE_FLOAT, H5T_NATIVE_DOUBLE, tid_str, - tid_enum, tid_array_f, tid_vlen_i, tid_vlen_s}; + tid_enum, tid_array_f, tid_vlen_i, tid_vlen_s}; hsize_t coords[4][2] = {{0, 1}, {3, 5}, {1, 0}, {2, 4}}, start = 0, stride = 1, count = 1; if (nrows < NROWS) From 0dc071d35122c7f1d140d46f99ecfb609cdf3eea Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 4 Oct 2024 14:14:23 -0700 Subject: [PATCH 2/3] Remove unnecessary clang-format off/on blocks --- src/H5Cimage.c | 36 ++++---- src/H5FDsubfiling/H5FDioc_priv.h | 127 +++++++++++++--------------- src/H5FDsubfiling/H5FDsubfiling.c | 3 - src/H5VMprivate.h | 19 ++--- src/H5build_settings.autotools.c.in | 2 - 5 files changed, 84 insertions(+), 103 deletions(-) diff --git a/src/H5Cimage.c b/src/H5Cimage.c index ec1af787d5e..eb89b735f27 100644 --- a/src/H5Cimage.c +++ b/src/H5Cimage.c @@ -82,25 +82,23 @@ * ***********************************************************************/ #if H5C_COLLECT_CACHE_STATS -/* clang-format off */ -#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_CREATE(cache_ptr) \ -do { \ - (cache_ptr)->images_created++; \ -} while (0) -#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_READ(cache_ptr) \ -do { \ - /* make sure image len is still good */ \ - assert((cache_ptr)->image_len > 0); \ - (cache_ptr)->images_read++; \ -} while (0) -#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_LOAD(cache_ptr) \ -do { \ - /* make sure image len is still good */ \ - assert((cache_ptr)->image_len > 0); \ - (cache_ptr)->images_loaded++; \ - (cache_ptr)->last_image_size = (cache_ptr)->image_len; \ -} while (0) -/* clang-format on */ +#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_CREATE(cache_ptr) \ + do { \ + (cache_ptr)->images_created++; \ + } while (0) +#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_READ(cache_ptr) \ + do { \ + /* make sure image len is still good */ \ + assert((cache_ptr)->image_len > 0); \ + (cache_ptr)->images_read++; \ + } while (0) +#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_LOAD(cache_ptr) \ + do { \ + /* make sure image len is still good */ \ + assert((cache_ptr)->image_len > 0); \ + (cache_ptr)->images_loaded++; \ + (cache_ptr)->last_image_size = (cache_ptr)->image_len; \ + } while (0) #else /* H5C_COLLECT_CACHE_STATS */ #define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_CREATE(cache_ptr) #define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_READ(cache_ptr) diff --git a/src/H5FDsubfiling/H5FDioc_priv.h b/src/H5FDsubfiling/H5FDioc_priv.h index 2f17dbe221d..c1b47661de5 100644 --- a/src/H5FDsubfiling/H5FDioc_priv.h +++ b/src/H5FDsubfiling/H5FDioc_priv.h @@ -65,74 +65,65 @@ #define H5FD_IOC__IO_Q_ENTRY_MAGIC 0x1357 -/* clang-format off */ - -#define H5FD_IOC__Q_APPEND(q_ptr, entry_ptr) \ -do { \ - assert(q_ptr); \ - assert((q_ptr)->magic == H5FD_IOC__IO_Q_MAGIC); \ - assert((((q_ptr)->q_len == 0) && ((q_ptr)->q_head == NULL) && ((q_ptr)->q_tail == NULL)) || \ - (((q_ptr)->q_len > 0) && ((q_ptr)->q_head != NULL) && ((q_ptr)->q_tail != NULL))); \ - assert(entry_ptr); \ - assert((entry_ptr)->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC); \ - assert((entry_ptr)->next == NULL); \ - assert((entry_ptr)->prev == NULL); \ - assert((entry_ptr)->in_progress == false); \ - \ - if ( ((q_ptr)->q_head) == NULL ) \ - { \ - ((q_ptr)->q_head) = (entry_ptr); \ - ((q_ptr)->q_tail) = (entry_ptr); \ - } \ - else \ - { \ - ((q_ptr)->q_tail)->next = (entry_ptr); \ - (entry_ptr)->prev = ((q_ptr)->q_tail); \ - ((q_ptr)->q_tail) = (entry_ptr); \ - } \ - ((q_ptr)->q_len)++; \ -} while ( false ) /* H5FD_IOC__Q_APPEND() */ - -#define H5FD_IOC__Q_REMOVE(q_ptr, entry_ptr) \ -do { \ - assert(q_ptr); \ - assert((q_ptr)->magic == H5FD_IOC__IO_Q_MAGIC); \ - assert((((q_ptr)->q_len == 1) && ((q_ptr)->q_head ==((q_ptr)->q_tail)) && ((q_ptr)->q_head == (entry_ptr))) || \ - (((q_ptr)->q_len > 0) && ((q_ptr)->q_head != NULL) && ((q_ptr)->q_tail != NULL))); \ - assert(entry_ptr); \ - assert((entry_ptr)->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC); \ - assert((((q_ptr)->q_len == 1) && ((entry_ptr)->next == NULL) && ((entry_ptr)->prev == NULL)) || \ - (((q_ptr)->q_len > 1) && (((entry_ptr)->next != NULL) || ((entry_ptr)->prev != NULL)))); \ - assert((entry_ptr)->in_progress == true); \ - \ - { \ - if ( (((q_ptr)->q_head)) == (entry_ptr) ) \ - { \ - (((q_ptr)->q_head)) = (entry_ptr)->next; \ - if ( (((q_ptr)->q_head)) != NULL ) \ - (((q_ptr)->q_head))->prev = NULL; \ - } \ - else \ - { \ - (entry_ptr)->prev->next = (entry_ptr)->next; \ - } \ - if (((q_ptr)->q_tail) == (entry_ptr) ) \ - { \ - ((q_ptr)->q_tail) = (entry_ptr)->prev; \ - if ( ((q_ptr)->q_tail) != NULL ) \ - ((q_ptr)->q_tail)->next = NULL; \ - } \ - else \ - { \ - (entry_ptr)->next->prev = (entry_ptr)->prev; \ - } \ - (entry_ptr)->next = NULL; \ - (entry_ptr)->prev = NULL; \ - ((q_ptr)->q_len)--; \ - } \ -} while ( false ) /* H5FD_IOC__Q_REMOVE() */ - -/* clang-format on */ +#define H5FD_IOC__Q_APPEND(q_ptr, entry_ptr) \ + do { \ + assert(q_ptr); \ + assert((q_ptr)->magic == H5FD_IOC__IO_Q_MAGIC); \ + assert((((q_ptr)->q_len == 0) && ((q_ptr)->q_head == NULL) && ((q_ptr)->q_tail == NULL)) || \ + (((q_ptr)->q_len > 0) && ((q_ptr)->q_head != NULL) && ((q_ptr)->q_tail != NULL))); \ + assert(entry_ptr); \ + assert((entry_ptr)->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC); \ + assert((entry_ptr)->next == NULL); \ + assert((entry_ptr)->prev == NULL); \ + assert((entry_ptr)->in_progress == false); \ + \ + if (((q_ptr)->q_head) == NULL) { \ + ((q_ptr)->q_head) = (entry_ptr); \ + ((q_ptr)->q_tail) = (entry_ptr); \ + } \ + else { \ + ((q_ptr)->q_tail)->next = (entry_ptr); \ + (entry_ptr)->prev = ((q_ptr)->q_tail); \ + ((q_ptr)->q_tail) = (entry_ptr); \ + } \ + ((q_ptr)->q_len)++; \ + } while (false) /* H5FD_IOC__Q_APPEND() */ + +#define H5FD_IOC__Q_REMOVE(q_ptr, entry_ptr) \ + do { \ + assert(q_ptr); \ + assert((q_ptr)->magic == H5FD_IOC__IO_Q_MAGIC); \ + assert((((q_ptr)->q_len == 1) && ((q_ptr)->q_head == ((q_ptr)->q_tail)) && \ + ((q_ptr)->q_head == (entry_ptr))) || \ + (((q_ptr)->q_len > 0) && ((q_ptr)->q_head != NULL) && ((q_ptr)->q_tail != NULL))); \ + assert(entry_ptr); \ + assert((entry_ptr)->magic == H5FD_IOC__IO_Q_ENTRY_MAGIC); \ + assert((((q_ptr)->q_len == 1) && ((entry_ptr)->next == NULL) && ((entry_ptr)->prev == NULL)) || \ + (((q_ptr)->q_len > 1) && (((entry_ptr)->next != NULL) || ((entry_ptr)->prev != NULL)))); \ + assert((entry_ptr)->in_progress == true); \ + \ + { \ + if ((((q_ptr)->q_head)) == (entry_ptr)) { \ + (((q_ptr)->q_head)) = (entry_ptr)->next; \ + if ((((q_ptr)->q_head)) != NULL) \ + (((q_ptr)->q_head))->prev = NULL; \ + } \ + else { \ + (entry_ptr)->prev->next = (entry_ptr)->next; \ + } \ + if (((q_ptr)->q_tail) == (entry_ptr)) { \ + ((q_ptr)->q_tail) = (entry_ptr)->prev; \ + if (((q_ptr)->q_tail) != NULL) \ + ((q_ptr)->q_tail)->next = NULL; \ + } \ + else { \ + (entry_ptr)->next->prev = (entry_ptr)->prev; \ + } \ + (entry_ptr)->next = NULL; \ + (entry_ptr)->prev = NULL; \ + ((q_ptr)->q_len)--; \ + } \ + } while (false) /* H5FD_IOC__Q_REMOVE() */ /**************************************************************************** * diff --git a/src/H5FDsubfiling/H5FDsubfiling.c b/src/H5FDsubfiling/H5FDsubfiling.c index 796654254ad..159b7175589 100644 --- a/src/H5FDsubfiling/H5FDsubfiling.c +++ b/src/H5FDsubfiling/H5FDsubfiling.c @@ -2050,8 +2050,6 @@ H5FD__subfiling_io_helper(H5FD_subfiling_t *file, size_t io_count, H5FD_mem_t ty H5_subfiling_dump_iovecs(sf_context, ioreq_count, iovec_len, io_type, io_types, io_addrs, io_sizes, io_bufs); #endif - - /* clang-format off */ /* * Having now populated the I/O vectors for this I/O request and * having determined how many I/O calls need to be made to satisfy @@ -2080,7 +2078,6 @@ H5FD__subfiling_io_helper(H5FD_subfiling_t *file, size_t io_count, H5FD_mem_t ty * ultimately responsible for mapping each I/O vector to its corresponding * subfile (here, pointed to by '->' to the right of each I/O vector). */ - /* clang-format on */ for (size_t ioreq_idx = 0; ioreq_idx < ioreq_count; ioreq_idx++) { H5_flexible_const_ptr_t *io_bufs_ptr = NULL; H5FD_mem_t *io_types_ptr = NULL; diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h index d4e427306db..456413fae9a 100644 --- a/src/H5VMprivate.h +++ b/src/H5VMprivate.h @@ -322,17 +322,14 @@ H5VM_vector_inc(int n, hsize_t *v1, const hsize_t *v2) /* Lookup table for general log2(n) routine */ static const unsigned char LogTable256[] = { - /* clang-clang-format off */ - 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 - /* clang-clang-format on */ -}; + 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}; /*------------------------------------------------------------------------- * Function: H5VM_log2_gen diff --git a/src/H5build_settings.autotools.c.in b/src/H5build_settings.autotools.c.in index 5ca1555a157..67bd023b961 100644 --- a/src/H5build_settings.autotools.c.in +++ b/src/H5build_settings.autotools.c.in @@ -15,7 +15,6 @@ H5_GCC_DIAG_OFF("larger-than=") H5_CLANG_DIAG_OFF("overlength-strings") -/* clang-format off */ const char H5build_settings[]= " SUMMARY OF THE HDF5 CONFIGURATION\n" " =================================\n" @@ -114,7 +113,6 @@ const char H5build_settings[]= " Strict file format checks: @STRICT_FORMAT_CHECKS@\n" " Optimization instrumentation: @INSTRUMENT_LIBRARY@\n" ; -/* clang-format on */ H5_GCC_DIAG_ON("larger-than=") H5_CLANG_DIAG_OFF("overlength-strings") From 62c2a69ea39e3424f6089502cf74f2cc224539dc Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 21:44:30 +0000 Subject: [PATCH 3/3] Committing clang-format changes --- src/H5B2private.h | 2 +- src/H5Bprivate.h | 14 ++++----- src/H5Cprivate.h | 2 +- src/H5Dpkg.h | 30 +++++++++--------- src/H5EApkg.h | 2 +- src/H5EAprivate.h | 10 +++--- src/H5FAprivate.h | 10 +++--- src/H5FDdevelop.h | 2 +- src/H5FSprivate.h | 6 ++-- src/H5Opkg.h | 52 ++++++++++++++++---------------- src/H5TSprivate.h | 12 ++++---- src/H5Tpkg.h | 2 +- src/H5VLconnector.h | 46 ++++++++++++++-------------- test/earray.c | 8 ++--- test/farray.c | 8 ++--- test/fillval.c | 22 +++++++------- test/testframe.c | 16 +++++----- tools/src/h5dump/h5dump.c | 2 +- tools/src/h5dump/h5dump.h | 12 ++++---- tools/src/h5dump/h5dump_extern.h | 12 ++++---- tools/src/h5ls/h5ls.c | 8 ++--- 21 files changed, 139 insertions(+), 139 deletions(-) diff --git a/src/H5B2private.h b/src/H5B2private.h index fbb1e7e2e10..bf06a8bd846 100644 --- a/src/H5B2private.h +++ b/src/H5B2private.h @@ -86,7 +86,7 @@ struct H5B2_class_t { size_t nrec_size; /* Size of native (memory) record */ /* Extensible array client callback methods */ - void *(*crt_context)(void *udata); /* Create context for other client callbacks */ + void *(*crt_context)(void *udata); /* Create context for other client callbacks */ herr_t (*dst_context)(void *ctx); /* Destroy client callback context */ herr_t (*store)(void *nrecord, const void *udata); /* Store application record in native record table */ herr_t (*compare)(const void *rec1, const void *rec2, int *result); /* Compare two native records */ diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h index 9cd5da11d73..f354dea2ac0 100644 --- a/src/H5Bprivate.h +++ b/src/H5Bprivate.h @@ -90,13 +90,13 @@ typedef struct H5B_shared_t { * array is initialized with the HDF5_BTREE_K_DEFAULT macro. */ typedef struct H5B_class_t { - H5B_subid_t id; /*id as found in file*/ - size_t sizeof_nkey; /*size of native (memory) key*/ - H5UC_t *(*get_shared)(const H5F_t *, const void *); /*shared info for node */ - herr_t (*new_node)(H5F_t *, H5B_ins_t, void *, void *, void *, haddr_t *); - int (*cmp2)(void *, void *, void *); /*compare 2 keys */ - int (*cmp3)(void *, void *, void *); /*compare 3 keys */ - htri_t (*found)(H5F_t *, haddr_t, const void *, bool *, void *); + H5B_subid_t id; /*id as found in file*/ + size_t sizeof_nkey; /*size of native (memory) key*/ + H5UC_t *(*get_shared)(const H5F_t *, const void *); /*shared info for node */ + herr_t (*new_node)(H5F_t *, H5B_ins_t, void *, void *, void *, haddr_t *); + int (*cmp2)(void *, void *, void *); /*compare 2 keys */ + int (*cmp3)(void *, void *, void *); /*compare 3 keys */ + htri_t (*found)(H5F_t *, haddr_t, const void *, bool *, void *); /* insert new data */ H5B_ins_t (*insert)(H5F_t *, haddr_t, void *, bool *, void *, void *, void *, bool *, haddr_t *); diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index c1af01cd35c..d7065799a67 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -860,7 +860,7 @@ typedef herr_t (*H5C_get_initial_load_size_func_t)(void *udata_ptr, size_t *imag typedef herr_t (*H5C_get_final_load_size_func_t)(const void *image_ptr, size_t image_len, void *udata_ptr, size_t *actual_len_ptr); typedef htri_t (*H5C_verify_chksum_func_t)(const void *image_ptr, size_t len, void *udata_ptr); -typedef void *(*H5C_deserialize_func_t)(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr); +typedef void *(*H5C_deserialize_func_t)(const void *image_ptr, size_t len, void *udata_ptr, bool *dirty_ptr); typedef herr_t (*H5C_image_len_func_t)(const void *thing, size_t *image_len_ptr); typedef herr_t (*H5C_pre_serialize_func_t)(H5F_t *f, void *thing, haddr_t addr, size_t len, haddr_t *new_addr_ptr, size_t *new_len_ptr, unsigned *flags_ptr); diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 8bd159d7a2b..c6c50c2eef3 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -140,17 +140,17 @@ struct H5D_dset_io_info_t; typedef struct H5D_shared_t H5D_shared_t; /* Function pointers for I/O on particular types of dataset layouts */ -typedef herr_t (*H5D_layout_construct_func_t)(H5F_t *f, H5D_t *dset); -typedef herr_t (*H5D_layout_init_func_t)(H5F_t *f, const H5D_t *dset, hid_t dapl_id); -typedef bool (*H5D_layout_is_space_alloc_func_t)(const H5O_storage_t *storage); -typedef bool (*H5D_layout_is_data_cached_func_t)(const H5D_shared_t *shared_dset); -typedef herr_t (*H5D_layout_io_init_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *dinfo); -typedef herr_t (*H5D_layout_mdio_init_func_t)(struct H5D_io_info_t *io_info, +typedef herr_t (*H5D_layout_construct_func_t)(H5F_t *f, H5D_t *dset); +typedef herr_t (*H5D_layout_init_func_t)(H5F_t *f, const H5D_t *dset, hid_t dapl_id); +typedef bool (*H5D_layout_is_space_alloc_func_t)(const H5O_storage_t *storage); +typedef bool (*H5D_layout_is_data_cached_func_t)(const H5D_shared_t *shared_dset); +typedef herr_t (*H5D_layout_io_init_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *dinfo); +typedef herr_t (*H5D_layout_mdio_init_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *dinfo); -typedef herr_t (*H5D_layout_read_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *dinfo); -typedef herr_t (*H5D_layout_write_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *dinfo); -typedef herr_t (*H5D_layout_read_md_func_t)(struct H5D_io_info_t *io_info); -typedef herr_t (*H5D_layout_write_md_func_t)(struct H5D_io_info_t *io_info); +typedef herr_t (*H5D_layout_read_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *dinfo); +typedef herr_t (*H5D_layout_write_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *dinfo); +typedef herr_t (*H5D_layout_read_md_func_t)(struct H5D_io_info_t *io_info); +typedef herr_t (*H5D_layout_write_md_func_t)(struct H5D_io_info_t *io_info); typedef ssize_t (*H5D_layout_readvv_func_t)(const struct H5D_io_info_t *io_info, const struct H5D_dset_io_info_t *dset_info, size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], @@ -163,9 +163,9 @@ typedef ssize_t (*H5D_layout_writevv_func_t)(const struct H5D_io_info_t *io hsize_t dset_offset_arr[], size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]); -typedef herr_t (*H5D_layout_flush_func_t)(H5D_t *dataset); -typedef herr_t (*H5D_layout_io_term_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *di); -typedef herr_t (*H5D_layout_dest_func_t)(H5D_t *dataset); +typedef herr_t (*H5D_layout_flush_func_t)(H5D_t *dataset); +typedef herr_t (*H5D_layout_io_term_func_t)(struct H5D_io_info_t *io_info, struct H5D_dset_io_info_t *di); +typedef herr_t (*H5D_layout_dest_func_t)(H5D_t *dataset); /* Typedef for grouping layout I/O routines */ typedef struct H5D_layout_ops_t { @@ -396,13 +396,13 @@ typedef herr_t (*H5D_chunk_create_func_t)(const H5D_chk_idx_info_t *idx_info); typedef herr_t (*H5D_chunk_open_func_t)(const H5D_chk_idx_info_t *idx_info); typedef herr_t (*H5D_chunk_close_func_t)(const H5D_chk_idx_info_t *idx_info); typedef herr_t (*H5D_chunk_is_open_func_t)(const H5D_chk_idx_info_t *idx_info, bool *is_open); -typedef bool (*H5D_chunk_is_space_alloc_func_t)(const H5O_storage_chunk_t *storage); +typedef bool (*H5D_chunk_is_space_alloc_func_t)(const H5O_storage_chunk_t *storage); typedef herr_t (*H5D_chunk_insert_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata, const H5D_t *dset); typedef herr_t (*H5D_chunk_get_addr_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata); typedef herr_t (*H5D_chunk_load_metadata_func_t)(const H5D_chk_idx_info_t *idx_info); typedef herr_t (*H5D_chunk_resize_func_t)(H5O_layout_chunk_t *layout); -typedef int (*H5D_chunk_iterate_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb, +typedef int (*H5D_chunk_iterate_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb, void *chunk_udata); typedef herr_t (*H5D_chunk_remove_func_t)(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata); typedef herr_t (*H5D_chunk_delete_func_t)(const H5D_chk_idx_info_t *idx_info); diff --git a/src/H5EApkg.h b/src/H5EApkg.h index 704e1587b06..3dd2a2da516 100644 --- a/src/H5EApkg.h +++ b/src/H5EApkg.h @@ -364,7 +364,7 @@ typedef struct H5EA_dblk_page_cache_ud_t { #ifdef H5EA_TESTING typedef struct H5EA__ctx_cb_t { herr_t (*encode)(const void *elmt, size_t nelmts, void *udata); /* Perform action during encode step */ - void *udata; /* User data for encode action */ + void *udata; /* User data for encode action */ } H5EA__ctx_cb_t; #endif /* H5EA_TESTING */ diff --git a/src/H5EAprivate.h b/src/H5EAprivate.h index 5a3eb3ba9ad..2780cb199d3 100644 --- a/src/H5EAprivate.h +++ b/src/H5EAprivate.h @@ -56,8 +56,8 @@ typedef struct H5EA_class_t { size_t nat_elmt_size; /* Size of native (memory) element */ /* Extensible array client callback methods */ - void *(*crt_context)(void *udata); /* Create context for other callbacks */ - herr_t (*dst_context)(void *ctx); /* Destroy context */ + void *(*crt_context)(void *udata); /* Create context for other callbacks */ + herr_t (*dst_context)(void *ctx); /* Destroy context */ herr_t (*fill)(void *nat_blk, size_t nelmts); /* Fill array of elements with encoded form of "missing element" value */ herr_t (*encode)(void *raw, const void *elmt, size_t nelmts, @@ -65,9 +65,9 @@ typedef struct H5EA_class_t { herr_t (*decode)(const void *raw, void *elmt, size_t nelmts, void *ctx); /* Decode elements from disk storage form to native form */ herr_t (*debug)(FILE *stream, int indent, int fwidth, hsize_t idx, - const void *elmt); /* Print an element for debugging */ - void *(*crt_dbg_ctx)(H5F_t *f, haddr_t obj_addr); /* Create debugging context */ - herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */ + const void *elmt); /* Print an element for debugging */ + void *(*crt_dbg_ctx)(H5F_t *f, haddr_t obj_addr); /* Create debugging context */ + herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */ } H5EA_class_t; /* Extensible array creation parameters */ diff --git a/src/H5FAprivate.h b/src/H5FAprivate.h index e0aa2d38b84..9bdc0742c75 100644 --- a/src/H5FAprivate.h +++ b/src/H5FAprivate.h @@ -56,8 +56,8 @@ typedef struct H5FA_class_t { size_t nat_elmt_size; /* Size of native (memory) element */ /* Fixed array client callback methods */ - void *(*crt_context)(void *udata); /* Create context for other callbacks */ - herr_t (*dst_context)(void *ctx); /* Destroy context */ + void *(*crt_context)(void *udata); /* Create context for other callbacks */ + herr_t (*dst_context)(void *ctx); /* Destroy context */ herr_t (*fill)(void *nat_blk, size_t nelmts); /* Fill array of elements with encoded form of "missing element" value */ herr_t (*encode)(void *raw, const void *elmt, size_t nelmts, @@ -65,9 +65,9 @@ typedef struct H5FA_class_t { herr_t (*decode)(const void *raw, void *elmt, size_t nelmts, void *ctx); /* Decode elements from disk storage form to native form */ herr_t (*debug)(FILE *stream, int indent, int fwidth, hsize_t idx, - const void *elmt); /* Print an element for debugging */ - void *(*crt_dbg_ctx)(H5F_t *f, haddr_t obj_addr); /* Create debugging context */ - herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */ + const void *elmt); /* Print an element for debugging */ + void *(*crt_dbg_ctx)(H5F_t *f, haddr_t obj_addr); /* Create debugging context */ + herr_t (*dst_dbg_ctx)(void *dbg_ctx); /* Destroy debugging context */ } H5FA_class_t; /* Fixed array creation parameters */ diff --git a/src/H5FDdevelop.h b/src/H5FDdevelop.h index c1183ace2b8..5f1be973d64 100644 --- a/src/H5FDdevelop.h +++ b/src/H5FDdevelop.h @@ -217,7 +217,7 @@ typedef struct H5FD_class_t { /**< Decodes the superblock information for this driver */ size_t fapl_size; /**< Size of driver-specific file access properties */ - void *(*fapl_get)(H5FD_t *file); + void *(*fapl_get)(H5FD_t *file); /**< Returns the file access property list */ void *(*fapl_copy)(const void *fapl); diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h index 035d88f9ee6..f917a253944 100644 --- a/src/H5FSprivate.h +++ b/src/H5FSprivate.h @@ -105,9 +105,9 @@ typedef struct H5FS_section_class_t { herr_t (*term_cls)(struct H5FS_section_class_t *); /* Routine to terminate class-specific settings */ /* Object methods */ - herr_t (*add)(H5FS_section_info_t **, unsigned *, + herr_t (*add)(H5FS_section_info_t **, unsigned *, void *); /* Routine called when section is about to be added to manager */ - herr_t (*serialize)(const struct H5FS_section_class_t *, const H5FS_section_info_t *, + herr_t (*serialize)(const struct H5FS_section_class_t *, const H5FS_section_info_t *, uint8_t *); /* Routine to serialize a "live" section into a buffer */ H5FS_section_info_t *(*deserialize)( const struct H5FS_section_class_t *, const uint8_t *, haddr_t, hsize_t, @@ -122,7 +122,7 @@ typedef struct H5FS_section_class_t { herr_t (*valid)(const struct H5FS_section_class_t *, const H5FS_section_info_t *); /* Routine to check if a section is valid */ H5FS_section_info_t *(*split)(H5FS_section_info_t *, hsize_t); /* Routine to create the split section */ - herr_t (*debug)(const H5FS_section_info_t *, FILE *, int, + herr_t (*debug)(const H5FS_section_info_t *, FILE *, int, int); /* Routine to dump debugging information about a section */ } H5FS_section_class_t; diff --git a/src/H5Opkg.h b/src/H5Opkg.h index f497e309000..d4cab42471d 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -212,25 +212,25 @@ struct H5O_msg_class_t { const char *name; /*for debugging */ size_t native_size; /*size of native message */ unsigned share_flags; /* Message sharing settings */ - void *(*decode)(H5F_t *, H5O_t *, unsigned, unsigned *, size_t, const uint8_t *); - herr_t (*encode)(H5F_t *, bool, size_t, uint8_t *, const void *); - void *(*copy)(const void *, void *); /*copy native value */ - size_t (*raw_size)(const H5F_t *, bool, const void *); /*sizeof encoded message */ - herr_t (*reset)(void *); /*free nested data structs */ - herr_t (*free)(void *); /*free main data struct */ - herr_t (*del)(H5F_t *, H5O_t *, void *); /* Delete space in file referenced by this message */ - herr_t (*link)(H5F_t *, H5O_t *, void *); /* Increment any links in file reference by this message */ - herr_t (*set_share)(void *, const H5O_shared_t *); /* Set shared information */ - htri_t (*can_share)(const void *); /* Is message allowed to be shared? */ - herr_t (*pre_copy_file)(H5F_t *, const void *, bool *, const H5O_copy_t *, + void *(*decode)(H5F_t *, H5O_t *, unsigned, unsigned *, size_t, const uint8_t *); + herr_t (*encode)(H5F_t *, bool, size_t, uint8_t *, const void *); + void *(*copy)(const void *, void *); /*copy native value */ + size_t (*raw_size)(const H5F_t *, bool, const void *); /*sizeof encoded message */ + herr_t (*reset)(void *); /*free nested data structs */ + herr_t (*free)(void *); /*free main data struct */ + herr_t (*del)(H5F_t *, H5O_t *, void *); /* Delete space in file referenced by this message */ + herr_t (*link)(H5F_t *, H5O_t *, void *); /* Increment any links in file reference by this message */ + herr_t (*set_share)(void *, const H5O_shared_t *); /* Set shared information */ + htri_t (*can_share)(const void *); /* Is message allowed to be shared? */ + herr_t (*pre_copy_file)(H5F_t *, const void *, bool *, const H5O_copy_t *, void *); /*"pre copy" action when copying native value to file */ - void *(*copy_file)(H5F_t *, void *, H5F_t *, bool *, unsigned *, H5O_copy_t *, + void *(*copy_file)(H5F_t *, void *, H5F_t *, bool *, unsigned *, H5O_copy_t *, void *); /*copy native value to file */ - herr_t (*post_copy_file)(const H5O_loc_t *, const void *, H5O_loc_t *, void *, unsigned *, + herr_t (*post_copy_file)(const H5O_loc_t *, const void *, H5O_loc_t *, void *, unsigned *, H5O_copy_t *); /*"post copy" action when copying native value to file */ - herr_t (*get_crt_index)(const void *, H5O_msg_crt_idx_t *); /* Get message's creation index */ - herr_t (*set_crt_index)(void *, H5O_msg_crt_idx_t); /* Set message's creation index */ - herr_t (*debug)(H5F_t *, const void *, FILE *, int, int); + herr_t (*get_crt_index)(const void *, H5O_msg_crt_idx_t *); /* Get message's creation index */ + herr_t (*set_crt_index)(void *, H5O_msg_crt_idx_t); /* Set message's creation index */ + herr_t (*debug)(H5F_t *, const void *, FILE *, int, int); }; struct H5O_mesg_t { @@ -321,17 +321,17 @@ struct H5O_t { /* Class for types of objects in file */ typedef struct H5O_obj_class_t { - H5O_type_t type; /*object type on disk */ - const char *name; /*for debugging */ - void *(*get_copy_file_udata)(void); /*retrieve user data for 'copy file' operation */ - void (*free_copy_file_udata)(void *); /*free user data for 'copy file' operation */ - htri_t (*isa)(const H5O_t *); /*if a header matches an object class */ - void *(*open)(const H5G_loc_t *, H5I_type_t *); /*open an object of this class */ - void *(*create)(H5F_t *, void *, H5G_loc_t *); /*create an object of this class */ - H5O_loc_t *(*get_oloc)(hid_t); /*get the object header location for an object */ - herr_t (*bh_info)(const H5O_loc_t *loc, H5O_t *oh, + H5O_type_t type; /*object type on disk */ + const char *name; /*for debugging */ + void *(*get_copy_file_udata)(void); /*retrieve user data for 'copy file' operation */ + void (*free_copy_file_udata)(void *); /*free user data for 'copy file' operation */ + htri_t (*isa)(const H5O_t *); /*if a header matches an object class */ + void *(*open)(const H5G_loc_t *, H5I_type_t *); /*open an object of this class */ + void *(*create)(H5F_t *, void *, H5G_loc_t *); /*create an object of this class */ + H5O_loc_t *(*get_oloc)(hid_t); /*get the object header location for an object */ + herr_t (*bh_info)(const H5O_loc_t *loc, H5O_t *oh, H5_ih_info_t *bh_info); /*get the index & heap info for an object */ - herr_t (*flush)(void *obj_ptr); /*flush an opened object of this class */ + herr_t (*flush)(void *obj_ptr); /*flush an opened object of this class */ } H5O_obj_class_t; /* Node in skip list to map addresses from one file to another during object header copy */ diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h index caa57425b71..64fd567a9bb 100644 --- a/src/H5TSprivate.h +++ b/src/H5TSprivate.h @@ -158,14 +158,14 @@ typedef struct H5TS_rwlock_t { unsigned readers, writers, read_waiters, write_waiters; } H5TS_rwlock_t; -typedef thrd_t H5TS_thread_t; -typedef int (*H5TS_thread_start_func_t)(void *); +typedef thrd_t H5TS_thread_t; +typedef int (*H5TS_thread_start_func_t)(void *); typedef int H5TS_thread_ret_t; typedef tss_t H5TS_key_t; typedef mtx_t H5TS_CAPABILITY("mutex") H5TS_mutex_t; typedef cnd_t H5TS_cond_t; typedef once_flag H5TS_once_t; -typedef void (*H5TS_once_init_func_t)(void); +typedef void (*H5TS_once_init_func_t)(void); #else #ifdef H5_HAVE_WIN_THREADS typedef HANDLE H5TS_thread_t; @@ -178,15 +178,15 @@ typedef CONDITION_VARIABLE H5TS_cond_t; typedef INIT_ONCE H5TS_once_t; typedef PINIT_ONCE_FN H5TS_once_init_func_t; #else -typedef pthread_t H5TS_thread_t; -typedef void *(*H5TS_thread_start_func_t)(void *); +typedef pthread_t H5TS_thread_t; +typedef void *(*H5TS_thread_start_func_t)(void *); typedef void *H5TS_thread_ret_t; typedef pthread_key_t H5TS_key_t; typedef pthread_mutex_t H5TS_CAPABILITY("mutex") H5TS_mutex_t; typedef pthread_rwlock_t H5TS_rwlock_t; typedef pthread_cond_t H5TS_cond_t; typedef pthread_once_t H5TS_once_t; -typedef void (*H5TS_once_init_func_t)(void); +typedef void (*H5TS_once_init_func_t)(void); #endif #endif diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 04d22313f5f..c3171ca0b81 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -249,7 +249,7 @@ typedef enum { /* VL function pointers */ typedef herr_t (*H5T_vlen_getlen_func_t)(H5VL_object_t *file, const void *vl_addr, size_t *len); -typedef void *(*H5T_vlen_getptr_func_t)(void *vl_addr); +typedef void *(*H5T_vlen_getptr_func_t)(void *vl_addr); typedef herr_t (*H5T_vlen_isnull_func_t)(const H5VL_object_t *file, void *vl_addr, bool *isnull); typedef herr_t (*H5T_vlen_setnull_func_t)(H5VL_object_t *file, void *_vl, void *_bg); typedef herr_t (*H5T_vlen_read_func_t)(H5VL_object_t *file, void *_vl, void *buf, size_t len); diff --git a/src/H5VLconnector.h b/src/H5VLconnector.h index 84a658218d5..19e5e11999c 100644 --- a/src/H5VLconnector.h +++ b/src/H5VLconnector.h @@ -843,8 +843,8 @@ typedef int H5VL_blob_optional_t; /* VOL connector info fields & callbacks */ typedef struct H5VL_info_class_t { - size_t size; /* Size of the VOL info */ - void *(*copy)(const void *info); /* Callback to create a copy of the VOL info */ + size_t size; /* Size of the VOL info */ + void *(*copy)(const void *info); /* Callback to create a copy of the VOL info */ herr_t (*cmp)(int *cmp_value, const void *info1, const void *info2); /* Callback to compare VOL info */ herr_t (*free)(void *info); /* Callback to release a VOL info */ herr_t (*to_str)(const void *info, char **str); /* Callback to serialize connector's info into a string */ @@ -856,22 +856,22 @@ typedef struct H5VL_info_class_t { /* (These must be implemented by "pass through" VOL connectors, and should not be implemented by terminal VOL * connectors) */ typedef struct H5VL_wrap_class_t { - void *(*get_object)(const void *obj); /* Callback to retrieve underlying object */ + void *(*get_object)(const void *obj); /* Callback to retrieve underlying object */ herr_t (*get_wrap_ctx)( const void *obj, void **wrap_ctx); /* Callback to retrieve the object wrapping context for the connector */ - void *(*wrap_object)(void *obj, H5I_type_t obj_type, + void *(*wrap_object)(void *obj, H5I_type_t obj_type, void *wrap_ctx); /* Callback to wrap a library object */ - void *(*unwrap_object)(void *obj); /* Callback to unwrap a library object */ + void *(*unwrap_object)(void *obj); /* Callback to unwrap a library object */ herr_t (*free_wrap_ctx)( void *wrap_ctx); /* Callback to release the object wrapping context for the connector */ } H5VL_wrap_class_t; /* H5A routines */ typedef struct H5VL_attr_class_t { - void *(*create)(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name, hid_t type_id, + void *(*create)(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t dxpl_id, void **req); - void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name, hid_t aapl_id, + void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *attr_name, hid_t aapl_id, hid_t dxpl_id, void **req); herr_t (*read)(void *attr, hid_t mem_type_id, void *buf, hid_t dxpl_id, void **req); herr_t (*write)(void *attr, hid_t mem_type_id, const void *buf, hid_t dxpl_id, void **req); @@ -884,9 +884,9 @@ typedef struct H5VL_attr_class_t { /* H5D routines */ typedef struct H5VL_dataset_class_t { - void *(*create)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t lcpl_id, + void *(*create)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t lcpl_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id, void **req); - void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t dapl_id, + void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t dapl_id, hid_t dxpl_id, void **req); herr_t (*read)(size_t count, void *dset[], hid_t mem_type_id[], hid_t mem_space_id[], hid_t file_space_id[], hid_t dxpl_id, void *buf[], void **req); @@ -900,9 +900,9 @@ typedef struct H5VL_dataset_class_t { /* H5T routines*/ typedef struct H5VL_datatype_class_t { - void *(*commit)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t type_id, + void *(*commit)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id, hid_t dxpl_id, void **req); - void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t tapl_id, + void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t tapl_id, hid_t dxpl_id, void **req); herr_t (*get)(void *obj, H5VL_datatype_get_args_t *args, hid_t dxpl_id, void **req); herr_t (*specific)(void *obj, H5VL_datatype_specific_args_t *args, hid_t dxpl_id, void **req); @@ -912,9 +912,9 @@ typedef struct H5VL_datatype_class_t { /* H5F routines */ typedef struct H5VL_file_class_t { - void *(*create)(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, + void *(*create)(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, void **req); - void *(*open)(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req); + void *(*open)(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req); herr_t (*get)(void *obj, H5VL_file_get_args_t *args, hid_t dxpl_id, void **req); herr_t (*specific)(void *obj, H5VL_file_specific_args_t *args, hid_t dxpl_id, void **req); herr_t (*optional)(void *obj, H5VL_optional_args_t *args, hid_t dxpl_id, void **req); @@ -923,9 +923,9 @@ typedef struct H5VL_file_class_t { /* H5G routines */ typedef struct H5VL_group_class_t { - void *(*create)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t lcpl_id, + void *(*create)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, hid_t dxpl_id, void **req); - void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t gapl_id, + void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, const char *name, hid_t gapl_id, hid_t dxpl_id, void **req); herr_t (*get)(void *obj, H5VL_group_get_args_t *args, hid_t dxpl_id, void **req); herr_t (*specific)(void *obj, H5VL_group_specific_args_t *args, hid_t dxpl_id, void **req); @@ -953,7 +953,7 @@ typedef struct H5VL_link_class_t { /* H5O routines */ typedef struct H5VL_object_class_t { - void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, H5I_type_t *opened_type, hid_t dxpl_id, + void *(*open)(void *obj, const H5VL_loc_params_t *loc_params, H5I_type_t *opened_type, hid_t dxpl_id, void **req); herr_t (*copy)(void *src_obj, const H5VL_loc_params_t *loc_params1, const char *src_name, void *dst_obj, const H5VL_loc_params_t *loc_params2, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id, @@ -1019,13 +1019,13 @@ typedef struct H5VL_token_class_t { //! typedef struct H5VL_class_t { /* Overall connector fields & callbacks */ - unsigned version; /**< VOL connector class struct version number */ - H5VL_class_value_t value; /**< Value to identify connector */ - const char *name; /**< Connector name (MUST be unique!) */ - unsigned conn_version; /**< Version number of connector */ - uint64_t cap_flags; /**< Capability flags for connector */ - herr_t (*initialize)(hid_t vipl_id); /**< Connector initialization callback */ - herr_t (*terminate)(void); /**< Connector termination callback */ + unsigned version; /**< VOL connector class struct version number */ + H5VL_class_value_t value; /**< Value to identify connector */ + const char *name; /**< Connector name (MUST be unique!) */ + unsigned conn_version; /**< Version number of connector */ + uint64_t cap_flags; /**< Capability flags for connector */ + herr_t (*initialize)(hid_t vipl_id); /**< Connector initialization callback */ + herr_t (*terminate)(void); /**< Connector termination callback */ /* VOL framework */ H5VL_info_class_t info_cls; /**< VOL info fields & callbacks */ diff --git a/test/earray.c b/test/earray.c index acd1a5c6de6..edd054994c7 100644 --- a/test/earray.c +++ b/test/earray.c @@ -114,13 +114,13 @@ typedef struct earray_test_param_t earray_test_param_t; /* Extensible array iterator class */ typedef struct earray_iter_t { - void *(*init)(const H5EA_create_t *cparam, const earray_test_param_t *tparam, - hsize_t cnt); /* Initialize/allocate iterator private info */ + void *(*init)(const H5EA_create_t *cparam, const earray_test_param_t *tparam, + hsize_t cnt); /* Initialize/allocate iterator private info */ hssize_t (*next)(void *info); /* Get the next element to test */ hssize_t (*max_elem)(const void *info); /* Get the max. element set */ - int (*state)(void *in_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam, + int (*state)(void *in_eiter, const H5EA_create_t *cparam, const earray_test_param_t *tparam, earray_state_t *state, hsize_t idx); /* Get the state of the extensible array */ - herr_t (*term)(void *info); /* Shutdown/free iterator private info */ + herr_t (*term)(void *info); /* Shutdown/free iterator private info */ } earray_iter_t; /* Testing parameters */ diff --git a/test/farray.c b/test/farray.c index 69adffd1ef0..b4cd1fef3c8 100644 --- a/test/farray.c +++ b/test/farray.c @@ -81,10 +81,10 @@ typedef struct farray_test_param_t farray_test_param_t; /* Fixed array iterator class */ typedef struct farray_iter_t { - void *(*init)(const H5FA_create_t *cparam, const farray_test_param_t *tparam, - hsize_t cnt); /* Initialize/allocate iterator private info */ - hssize_t (*next)(void *info); /* Get the next element to test */ - herr_t (*term)(void *info); /* Shutdown/free iterator private info */ + void *(*init)(const H5FA_create_t *cparam, const farray_test_param_t *tparam, + hsize_t cnt); /* Initialize/allocate iterator private info */ + hssize_t (*next)(void *info); /* Get the next element to test */ + herr_t (*term)(void *info); /* Shutdown/free iterator private info */ } farray_iter_t; /* Testing parameters */ diff --git a/test/fillval.c b/test/fillval.c index b86f153a6ef..49ee2011256 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -1565,17 +1565,17 @@ static int test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t *ch_size, hsize_t *start_size, hsize_t *max_size, hid_t dtype, void *fillval) { - hid_t fspace = H5I_INVALID_HID, mspace = H5I_INVALID_HID; /* File & memory dataspaces */ - hid_t dset = H5I_INVALID_HID; /* Dataset ID */ - hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */ - hsize_t extend_size[5]; /* Dimensions to extend to */ - hsize_t one[5] = {1, 1, 1, 1, 1}; /* Dimensions of single element dataspace */ - hsize_t hs_size[5], hs_stride[5], hs_offset[5]; - size_t nelmts; - H5T_class_t dtype_class; /* Class of datatype */ - int (*init_rtn)(void *, size_t, const void *); - int (*verify_rtn)(unsigned, const hsize_t *, const void *, const void *); - int (*release_rtn)(void *); + hid_t fspace = H5I_INVALID_HID, mspace = H5I_INVALID_HID; /* File & memory dataspaces */ + hid_t dset = H5I_INVALID_HID; /* Dataset ID */ + hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */ + hsize_t extend_size[5]; /* Dimensions to extend to */ + hsize_t one[5] = {1, 1, 1, 1, 1}; /* Dimensions of single element dataspace */ + hsize_t hs_size[5], hs_stride[5], hs_offset[5]; + size_t nelmts; + H5T_class_t dtype_class; /* Class of datatype */ + int (*init_rtn)(void *, size_t, const void *); + int (*verify_rtn)(unsigned, const hsize_t *, const void *, const void *); + int (*release_rtn)(void *); size_t val_size; /* Size of element */ void *val_rd, *odd_val; const void *init_val, *should_be, *even_val; diff --git a/test/testframe.c b/test/testframe.c index fe84e3e17a3..dd5a7bb8dce 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -22,11 +22,11 @@ */ typedef struct TestStruct { - char Name[MAXTESTNAME]; - char Description[MAXTESTDESC]; - void (*TestFunc)(const void *); - void (*TestSetupFunc)(void *); - void (*TestCleanupFunc)(void *); + char Name[MAXTESTNAME]; + char Description[MAXTESTDESC]; + void (*TestFunc)(const void *); + void (*TestSetupFunc)(void *); + void (*TestCleanupFunc)(void *); void *TestParameters; int TestNumErrors; int TestSkipFlag; @@ -40,9 +40,9 @@ static TestStruct *TestArray = NULL; /* Array of tests */ static unsigned TestAlloc = 0; /* Size of the Test array */ static unsigned TestCount = 0; /* Number of tests currently added to test array */ -static const char *TestProgName = NULL; -static void (*TestPrivateUsage_g)(FILE *stream) = NULL; -static herr_t (*TestPrivateParser_g)(int argc, char *argv[]) = NULL; +static const char *TestProgName = NULL; +static void (*TestPrivateUsage_g)(FILE *stream) = NULL; +static herr_t (*TestPrivateParser_g)(int argc, char *argv[]) = NULL; static int TestNumErrs_g = 0; /* Total number of errors that occurred for whole test program */ static bool TestEnableErrorStack = true; /* Whether to show error stacks from the library */ diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 77d68e3f8e2..6f37c1bc2be 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -86,7 +86,7 @@ static void init_prefix(char **prfx, size_t prfx_len); /* a structure for handling the order command-line parameters come in */ struct handler_t { - void (*func)(hid_t, const char *, void *, int, const char *); + void (*func)(hid_t, const char *, void *, int, const char *); char *obj; struct subset_t *subset_info; }; diff --git a/tools/src/h5dump/h5dump.h b/tools/src/h5dump/h5dump.h index 3829ea3d8a0..f50950b5548 100644 --- a/tools/src/h5dump/h5dump.h +++ b/tools/src/h5dump/h5dump.h @@ -206,13 +206,13 @@ **/ /* the table of dump functions */ typedef struct dump_functions_t { - void (*dump_group_function)(hid_t, const char *); - void (*dump_named_datatype_function)(hid_t, const char *); - void (*dump_dataset_function)(hid_t, const char *, struct subset_t *); - void (*dump_dataspace_function)(hid_t); - void (*dump_datatype_function)(hid_t); + void (*dump_group_function)(hid_t, const char *); + void (*dump_named_datatype_function)(hid_t, const char *); + void (*dump_dataset_function)(hid_t, const char *, struct subset_t *); + void (*dump_dataspace_function)(hid_t); + void (*dump_datatype_function)(hid_t); herr_t (*dump_attribute_function)(hid_t, const char *, const H5A_info_t *, void *); - void (*dump_data_function)(hid_t, int, struct subset_t *, int); + void (*dump_data_function)(hid_t, int, struct subset_t *, int); } dump_functions; /* List of table structures. There is one table structure for each file */ diff --git a/tools/src/h5dump/h5dump_extern.h b/tools/src/h5dump/h5dump_extern.h index bc4c3017ae1..ca4a92906bf 100644 --- a/tools/src/h5dump/h5dump_extern.h +++ b/tools/src/h5dump/h5dump_extern.h @@ -25,13 +25,13 @@ **/ /* the table of dump functions */ typedef struct dump_functions_t { - void (*dump_group_function)(hid_t, const char *); - void (*dump_named_datatype_function)(hid_t, const char *); - void (*dump_dataset_function)(hid_t, const char *, struct subset_t *); - void (*dump_dataspace_function)(hid_t); - void (*dump_datatype_function)(hid_t); + void (*dump_group_function)(hid_t, const char *); + void (*dump_named_datatype_function)(hid_t, const char *); + void (*dump_dataset_function)(hid_t, const char *, struct subset_t *); + void (*dump_dataspace_function)(hid_t); + void (*dump_datatype_function)(hid_t); herr_t (*dump_attribute_function)(hid_t, const char *, const H5A_info_t *, void *); - void (*dump_data_function)(hid_t, int, struct subset_t *, int); + void (*dump_data_function)(hid_t, int, struct subset_t *, int); } dump_functions; /* List of table structures. There is one table structure for each file */ diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index c7f5d4a58de..3e9255019ca 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -135,10 +135,10 @@ static bool display_root_g = false; /* show root group in output? */ /* Information about how to display each type of object */ static struct dispatch_t { const char *name; - hid_t (*open)(hid_t loc, const char *name, hid_t apl_id); - herr_t (*close)(hid_t obj); - herr_t (*list1)(hid_t obj); - herr_t (*list2)(hid_t obj, const char *name); + hid_t (*open)(hid_t loc, const char *name, hid_t apl_id); + herr_t (*close)(hid_t obj); + herr_t (*list1)(hid_t obj); + herr_t (*list2)(hid_t obj, const char *name); } dispatch_g[H5O_TYPE_NTYPES]; #define DISPATCH(TYPE, NAME, LIST1, LIST2) \