From 4a6872cbf62380ec0ee3394d5e0710de2216b21d Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Thu, 15 Jun 2023 09:50:02 -0500 Subject: Merges from develop/1.14 (#3118) * Fix release action that allows files to be uploaded. Add autotools h5copy help test. Update cmake tools.cmake file for clang-tidy. CMake build is missing H5FDsubfiling.h macros improved for configure output capture. Remove obsolete files * Revert parallel config with TS * Fix doxygen warnings --- .github/workflows/cmake-ctest.yml | 12 +- .github/workflows/main.yml | 33 +++- .github/workflows/release.yml | 34 ++-- config/cmake/ConfigureChecks.cmake | 5 + config/cmake/FindSZIP.cmake | 129 -------------- config/cmake/HDF5Macros.cmake | 12 +- config/cmake/HDF5UseFortran.cmake | 29 ++-- config/cmake/HDFCompilerFlags.cmake | 5 +- config/cmake/HDFLibMacros.cmake | 4 +- config/cmake/UserMacros/Windows_MT.cmake | 1 + config/sanitizer/tools.cmake | 135 +++++++-------- doxygen/Doxyfile.in | 2 +- doxygen/dox/LearnBasics3.dox | 2 +- doxygen/dox/ReferenceManual.dox | 4 - doxygen/examples/menus/core_menu.md | 4 - doxygen/examples/tables/propertyLists.dox | 28 --- java/CMakeLists.txt | 2 +- java/examples/datasets/CMakeLists.txt | 26 ++- java/examples/datatypes/CMakeLists.txt | 17 +- java/examples/groups/CMakeLists.txt | 30 +++- java/examples/intro/CMakeLists.txt | 17 +- java/src/Makefile.am | 9 +- java/src/hdf/hdf5lib/CMakeLists.txt | 13 -- java/src/hdf/hdf5lib/H5.java | 12 +- java/src/hdf/hdf5lib/HDF5GroupInfo.java | 188 --------------------- java/src/hdf/hdf5lib/HDFArray.java | 2 + java/src/hdf/hdf5lib/callbacks/package-info.java | 1 - java/src/hdf/hdf5lib/exceptions/package-info.java | 3 +- java/src/hdf/hdf5lib/package-info.java | 1 - java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java | 1 - java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java | 1 - java/src/hdf/hdf5lib/structs/package-info.java | 1 - java/src/jni/h5fImp.c | 8 +- java/src/jni/h5lImp.c | 8 +- java/src/jni/h5pDAPLImp.c | 2 + java/src/jni/h5pFAPLImp.c | 2 + java/src/jni/h5tImp.c | 2 +- m4/aclocal_fc.f90 | 20 +-- release_docs/RELEASE.txt | 10 +- src/H5Dpublic.h | 42 ++--- src/H5Fpublic.h | 16 +- src/H5Rpublic.h | 14 +- 42 files changed, 320 insertions(+), 567 deletions(-) delete mode 100644 config/cmake/FindSZIP.cmake delete mode 100644 java/src/hdf/hdf5lib/HDF5GroupInfo.java diff --git a/.github/workflows/cmake-ctest.yml b/.github/workflows/cmake-ctest.yml index 4363d0f..ffd56e2 100644 --- a/.github/workflows/cmake-ctest.yml +++ b/.github/workflows/cmake-ctest.yml @@ -96,7 +96,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install CMake Dependencies (Linux) - run: sudo apt-get install ninja-build + run: sudo apt-get install ninja-build doxygen graphviz - name: Set file base name (Linux) id: set-file-base @@ -151,6 +151,14 @@ jobs: path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` + # Save doxygen files created by ctest script + - name: Save published doxygen (Linux) + uses: actions/upload-artifact@v3 + with: + name: docs-doxygen + path: ${{ runner.workspace }}/hdf5/build/ci-StdShar-GNUC/hdf5lib_docs/html + if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` + build_and_test_mac: # MacOS w/ Clang + CMake # @@ -158,7 +166,7 @@ jobs: runs-on: macos-11 steps: - name: Install Dependencies (MacOS) - run: brew install ninja + run: brew install ninja doxygen - name: Set file base name (MacOS) id: set-file-base diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3a8854d..68c8d9e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -81,6 +81,7 @@ jobs: cpp: ON fortran: OFF java: ON + docs: OFF libaecfc: ON localaec: OFF zlibfc: ON @@ -88,6 +89,7 @@ jobs: parallel: OFF mirror_vfd: OFF direct_vfd: OFF + ros3_vfd: OFF generator: "-G \"Visual Studio 17 2022\" -A x64" run_tests: true @@ -100,6 +102,7 @@ jobs: cpp: ON fortran: ON java: ON + docs: ON libaecfc: ON localaec: OFF zlibfc: ON @@ -107,6 +110,7 @@ jobs: parallel: OFF mirror_vfd: ON direct_vfd: ON + ros3_vfd: OFF toolchain: "config/toolchain/gcc.cmake" generator: "-G Ninja" run_tests: true @@ -120,9 +124,11 @@ jobs: cpp: enable fortran: enable java: enable + docs: disable parallel: disable mirror_vfd: enable direct_vfd: enable + ros3_vfd: enable deprec_sym: enable default_api: v112 szip: yes @@ -141,9 +147,11 @@ jobs: cpp: disable fortran: enable java: disable + docs: disable parallel: enable mirror_vfd: disable direct_vfd: disable + ros3_vfd: disable deprec_sym: enable default_api: v112 szip: yes @@ -161,6 +169,7 @@ jobs: cpp: ON fortran: OFF java: ON + docs: OFF libaecfc: ON localaec: OFF zlibfc: ON @@ -168,6 +177,7 @@ jobs: parallel: OFF mirror_vfd: ON direct_vfd: OFF + ros3_vfd: OFF toolchain: "config/toolchain/clang.cmake" generator: "-G Ninja" run_tests: true @@ -186,9 +196,11 @@ jobs: cpp: enable fortran: enable java: enable + docs: disable parallel: disable mirror_vfd: enable direct_vfd: enable + ros3_vfd: enable deprec_sym: enable default_api: v16 szip: yes @@ -209,9 +221,11 @@ jobs: cpp: enable fortran: enable java: enable + docs: disable parallel: disable mirror_vfd: enable direct_vfd: enable + ros3_vfd: enable deprec_sym: enable default_api: v18 szip: yes @@ -232,9 +246,11 @@ jobs: cpp: enable fortran: enable java: enable + docs: disable parallel: disable mirror_vfd: enable direct_vfd: enable + ros3_vfd: enable deprec_sym: enable default_api: v110 szip: yes @@ -255,9 +271,11 @@ jobs: cpp: enable fortran: enable java: enable + docs: disable parallel: disable mirror_vfd: enable direct_vfd: enable + ros3_vfd: enable deprec_sym: enable default_api: v112 szip: yes @@ -278,9 +296,11 @@ jobs: cpp: enable fortran: enable java: enable + docs: disable parallel: disable mirror_vfd: enable direct_vfd: enable + ros3_vfd: enable deprec_sym: disable default_api: v112 szip: yes @@ -317,7 +337,7 @@ jobs: run: echo '${{ toJSON(matrix) }}' - name: Install CMake Dependencies (Linux) - run: sudo apt-get install ninja-build + run: sudo apt-get install ninja-build doxygen graphviz if: matrix.os == 'ubuntu-latest' - name: Install Autotools Dependencies (Linux, serial) @@ -325,6 +345,7 @@ jobs: sudo apt update sudo apt install automake autoconf libtool libtool-bin sudo apt install gcc-12 g++-12 gfortran-12 + sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev echo "CC=gcc-12" >> $GITHUB_ENV echo "CXX=g++-12" >> $GITHUB_ENV echo "FC=gfortran-12" >> $GITHUB_ENV @@ -346,7 +367,7 @@ jobs: if: matrix.os == 'windows-latest' - name: Install Dependencies (macOS) - run: brew install ninja + run: brew install ninja doxygen if: matrix.os == 'macos-13' - name: Set environment for MSVC (Windows) @@ -369,7 +390,7 @@ jobs: sh ./autogen.sh mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" - ${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_mode.autotools }} --${{ matrix.deprec_sym }}-deprecated-symbols --with-default-api-version=${{ matrix.default_api }} --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd --with-szlib=${{ matrix.szip }} + ${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_mode.autotools }} --${{ matrix.deprec_sym }}-deprecated-symbols --with-default-api-version=${{ matrix.default_api }} --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --${{ matrix.java }}-java --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd --${{ matrix.ros3_vfd }}-ros3-vfd --with-szlib=${{ matrix.szip }} shell: bash if: (matrix.generator == 'autogen') && ! (matrix.thread_safety.enabled) @@ -378,7 +399,7 @@ jobs: sh ./autogen.sh mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" - ${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_mode.autotools }} --enable-shared --enable-threadsafe --disable-hl --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd --with-szlib=${{ matrix.szip }} + ${{ matrix.flags }} $GITHUB_WORKSPACE/configure --enable-build-mode=${{ matrix.build_mode.autotools }} --enable-shared --enable-threadsafe --disable-hl --${{ matrix.mirror_vfd }}-mirror-vfd --${{ matrix.direct_vfd }}-direct-vfd --${{ matrix.ros3_vfd }}-ros3-vfd --with-szlib=${{ matrix.szip }} shell: bash if: (matrix.generator == 'autogen') && (matrix.thread_safety.enabled) @@ -390,7 +411,7 @@ jobs: run: | mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" - cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=${{ matrix.java }} -DBUILD_SZIP_WITH_FETCHCONTENT=${{ matrix.libaecfc }} -DLIBAEC_USE_LOCALCONTENT=${{ matrix.localaec }} -DBUILD_ZLIB_WITH_FETCHCONTENT=${{ matrix.zlibfc }} -DZLIB_USE_LOCALCONTENT=${{ matrix.localzlib }} -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} $GITHUB_WORKSPACE + cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=${{ matrix.java }} -DHDF5_BUILD_DOC=${{ matrix.docs }} -DBUILD_SZIP_WITH_FETCHCONTENT=${{ matrix.libaecfc }} -DLIBAEC_USE_LOCALCONTENT=${{ matrix.localaec }} -DBUILD_ZLIB_WITH_FETCHCONTENT=${{ matrix.zlibfc }} -DZLIB_USE_LOCALCONTENT=${{ matrix.localzlib }} -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} -DHDF5_ENABLE_ROS3_VFD:BOOL=${{ matrix.ros3_vfd }} $GITHUB_WORKSPACE shell: bash if: (matrix.generator != 'autogen') && ! (matrix.thread_safety.enabled) @@ -399,7 +420,7 @@ jobs: run: | mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" - cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=OFF -DHDF5_BUILD_FORTRAN:BOOL=OFF -DHDF5_BUILD_JAVA:BOOL=OFF -DHDF5_BUILD_HL_LIB:BOOL=OFF -DBUILD_SZIP_WITH_FETCHCONTENT=${{ matrix.libaecfc }} -DLIBAEC_USE_LOCALCONTENT=${{ matrix.localaec }} -DBUILD_ZLIB_WITH_FETCHCONTENT=${{ matrix.zlibfc }} -DZLIB_USE_LOCALCONTENT=${{ matrix.localzlib }} -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} $GITHUB_WORKSPACE + cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_THREADSAFE:BOOL=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=OFF -DHDF5_BUILD_FORTRAN:BOOL=OFF -DHDF5_BUILD_JAVA:BOOL=OFF -DHDF5_BUILD_HL_LIB:BOOL=OFF -DHDF5_BUILD_DOC=OFF -DBUILD_SZIP_WITH_FETCHCONTENT=${{ matrix.libaecfc }} -DLIBAEC_USE_LOCALCONTENT=${{ matrix.localaec }} -DBUILD_ZLIB_WITH_FETCHCONTENT=${{ matrix.zlibfc }} -DZLIB_USE_LOCALCONTENT=${{ matrix.localzlib }} -DHDF5_ENABLE_MIRROR_VFD:BOOL=${{ matrix.mirror_vfd }} -DHDF5_ENABLE_DIRECT_VFD:BOOL=${{ matrix.direct_vfd }} -DHDF5_ENABLE_ROS3_VFD:BOOL=${{ matrix.ros3_vfd }} $GITHUB_WORKSPACE shell: bash if: (matrix.generator != 'autogen') && (matrix.thread_safety.enabled) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e15c6b3..ab2efb7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,16 +45,26 @@ jobs: - run: | echo "Tag already present: ${{ steps.tag_create.outputs.tag_exists }}" - getfiles: + PreRelease-getfiles: runs-on: ubuntu-latest + needs: create-tag + environment: snapshots_1_12 + permissions: + contents: write steps: - - name: Set file base name - id: set-file-base + - name: Get file base name + id: get-file-base run: | FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT # Get files created by tarball script + - name: Get doxygen (Linux) + uses: actions/download-artifact@v3 + with: + name: docs-doxygen + path: ${{ github.workspace }}/${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen + - name: Get tgz-tarball (Linux) uses: actions/download-artifact@v3 with: @@ -86,27 +96,13 @@ jobs: name: tgz-ubuntu-2204-binary path: ${{ github.workspace }} - # Get files used by release script - - PreRelease: - runs-on: ubuntu-latest - needs: [create-tag, getfiles] - environment: snapshots_1_12 - permissions: - contents: write - steps: - - name: Set file base name - id: get-file-base - run: | - FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") - echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT - - name: PreRelease tag uses: softprops/action-gh-release@v1 with: - tag_name: "snapshot" + tag_name: "snapshot_1_12" prerelease: true files: | + ${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen ${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz ${{ steps.get-file-base.outputs.FILE_BASE }}.zip ${{ steps.get-file-base.outputs.FILE_BASE }}-osx12.tar.gz diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index c72f415..8900d4c 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -272,6 +272,7 @@ if (MINGW OR NOT WINDOWS) set (HDF_EXTRA_C_FLAGS ${HDF_EXTRA_C_FLAGS} -D_GNU_SOURCE) option (HDF_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON) + mark_as_advanced (HDF_ENABLE_LARGE_FILE) if (HDF_ENABLE_LARGE_FILE AND NOT DEFINED TEST_LFS_WORKS_RUN) set (msg "Performing TEST_LFS_WORKS") try_run (TEST_LFS_WORKS_RUN TEST_LFS_WORKS_COMPILE @@ -702,6 +703,7 @@ endif () # Option for --enable-strict-format-checks #----------------------------------------------------------------------------- option (HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF) +mark_as_advanced (HDF5_STRICT_FORMAT_CHECKS) if (HDF5_STRICT_FORMAT_CHECKS) set (${HDF_PREFIX}_STRICT_FORMAT_CHECKS 1) endif () @@ -714,6 +716,7 @@ MARK_AS_ADVANCED (HDF5_STRICT_FORMAT_CHECKS) # support denormalized floating values) to maximize speed. #----------------------------------------------------------------------------- option (HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON) +mark_as_advanced (HDF5_WANT_DATA_ACCURACY) if (HDF5_WANT_DATA_ACCURACY) set (${HDF_PREFIX}_WANT_DATA_ACCURACY 1) endif () @@ -726,6 +729,7 @@ MARK_AS_ADVANCED (HDF5_WANT_DATA_ACCURACY) # actually benefit little. #----------------------------------------------------------------------------- option (HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON) +mark_as_advanced (HDF5_WANT_DCONV_EXCEPTION) if (HDF5_WANT_DCONV_EXCEPTION) set (${HDF_PREFIX}_WANT_DCONV_EXCEPTION 1) endif () @@ -735,6 +739,7 @@ MARK_AS_ADVANCED (HDF5_WANT_DCONV_EXCEPTION) # Check if they would like the function stack support compiled in #----------------------------------------------------------------------------- option (HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF) +mark_as_advanced (HDF5_ENABLE_CODESTACK) if (HDF5_ENABLE_CODESTACK) set (${HDF_PREFIX}_HAVE_CODESTACK 1) endif () diff --git a/config/cmake/FindSZIP.cmake b/config/cmake/FindSZIP.cmake deleted file mode 100644 index 846a3d1..0000000 --- a/config/cmake/FindSZIP.cmake +++ /dev/null @@ -1,129 +0,0 @@ -# -# Copyright by The HDF Group. -# All rights reserved. -# -# This file is part of HDF5. The full HDF5 copyright notice, including -# terms governing use, modification, and redistribution, is contained in -# the COPYING file, which can be found at the root of the source code -# distribution tree, or in https://www.hdfgroup.org/licenses. -# If you do not have access to either file, you may request a copy from -# help@hdfgroup.org. -# -######################################################################### - -# - Derived from the FindTiff.cmake and FindJPEG.cmake that is included with cmake -# FindSZIP - -# Find the native SZIP includes and library - -# Imported targets -################## - -# This module defines the following :prop_tgt:`IMPORTED` targets: -# -# SZIP::SZIP -# The SZIP library, if found. -# -# Result variables -################### - -# This module will set the following variables in your project: - -# SZIP_FOUND, true if the SZIP headers and libraries were found. -# SZIP_INCLUDE_DIR, the directory containing the SZIP headers. -# SZIP_INCLUDE_DIRS, the directory containing the SZIP headers. -# SZIP_LIBRARIES, libraries to link against to use SZIP. - -# Cache variables -################# - -# The following variables may also be set: - -# SZIP_LIBRARY, where to find the SZIP library. -# SZIP_LIBRARY_DEBUG - Debug version of SZIP library -# SZIP_LIBRARY_RELEASE - Release Version of SZIP library - -# message (STATUS "Finding SZIP library and headers..." ) -######################################################################### - - -find_path(SZIP_INCLUDE_DIR szlib.h) - -set(szip_names ${SZIP_NAMES} sz szip szip-static libsz libszip libszip-static) -foreach(name ${szip_names}) - list (APPEND szip_names_debug "${name}d") -endforeach() - -if(NOT SZIP_LIBRARY) - find_library(SZIP_LIBRARY_RELEASE NAMES ${szip_names}) - find_library(SZIP_LIBRARY_DEBUG NAMES ${szip_names_debug}) - include(SelectLibraryConfigurations) - select_library_configurations(SZIP) - mark_as_advanced(SZIP_LIBRARY_RELEASE SZIP_LIBRARY_DEBUG) -endif() -unset(szip_names) -unset(szip_names_debug) - -if(SZIP_INCLUDE_DIR AND EXISTS "${SZIP_INCLUDE_DIR}/SZconfig.h") - file(STRINGS "${SZIP_INCLUDE_DIR}/SZconfig.h" szip_version_str - REGEX "^#define[\t ]+SZIP_PACKAGE_VERSION[\t ]+.*") - - string(REGEX REPLACE "^#define[\t ]+SZIP_PACKAGE_VERSION[\t ]+([0-9]+).*" - "\\1" SZIP_VERSION "${szip_version_str}") - unset(szip_version_str) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SZIP - REQUIRED_VARS SZIP_LIBRARY SZIP_INCLUDE_DIR - VERSION_VAR SZIP_VERSION) - -if(SZIP_FOUND) - set(SZIP_LIBRARIES ${SZIP_LIBRARY}) - set(SZIP_INCLUDE_DIRS "${SZIP_INCLUDE_DIR}") - - if(NOT TARGET SZIP::SZIP) - add_library(SZIP::SZIP UNKNOWN IMPORTED) - if(SZIP_INCLUDE_DIRS) - set_target_properties(SZIP::SZIP PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${SZIP_INCLUDE_DIRS}") - endif() - if(EXISTS "${SZIP_LIBRARY}") - set_target_properties(SZIP::SZIP PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "C" - IMPORTED_LOCATION "${SZIP_LIBRARY}") - endif() - if(EXISTS "${SZIP_LIBRARY_RELEASE}") - set_property(TARGET SZIP::SZIP APPEND PROPERTY - IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(SZIP::SZIP PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" - IMPORTED_LOCATION_RELEASE "${SZIP_LIBRARY_RELEASE}") - endif() - if(EXISTS "${SZIP_LIBRARY_DEBUG}") - set_property(TARGET SZIP::SZIP APPEND PROPERTY - IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties(SZIP::SZIP PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" - IMPORTED_LOCATION_DEBUG "${SZIP_LIBRARY_DEBUG}") - endif() - endif() -endif() - -mark_as_advanced(SZIP_LIBRARY SZIP_INCLUDE_DIR) - -# Report the results. -if (NOT SZIP_FOUND) - set (SZIP_DIR_MESSAGE - "SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR are set or set the SZIP_INSTALL environment variable." - ) - if (NOT SZIP_FIND_QUIETLY) - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0") - message (VERBOSE "${SZIP_DIR_MESSAGE}") - endif () - else () - if (SZIP_FIND_REQUIRED) - message (FATAL_ERROR "SZip was NOT found and is Required by this project") - endif () - endif () -endif () diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index 8b8b334..710c28b 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -75,23 +75,23 @@ macro (H5_SET_VFD_LIST) ) if (H5_HAVE_DIRECT) - set (VFD_LIST ${VFD_LIST} direct) + list (APPEND VFD_LIST direct) endif () if (H5_HAVE_PARALLEL) # MPI I/O VFD is currently incompatible with too many tests in the VFD test set - # set (VFD_LIST ${VFD_LIST} mpio) + # list (APPEND VFD_LIST mpio) endif () if (H5_HAVE_MIRROR_VFD) - set (VFD_LIST ${VFD_LIST} mirror) + list (APPEND VFD_LIST mirror) endif () if (H5_HAVE_ROS3_VFD) - set (VFD_LIST ${VFD_LIST} ros3) + list (APPEND VFD_LIST ros3) endif () if (H5_HAVE_LIBHDFS) - set (VFD_LIST ${VFD_LIST} hdfs) + list (APPEND VFD_LIST hdfs) endif () if (H5_HAVE_WINDOWS) - set (VFD_LIST ${VFD_LIST} windows) + list (APPEND VFD_LIST windows) endif () endmacro () diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 43e006c..5cf5088 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -43,11 +43,16 @@ macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90 "${SOURCE_CODE}" ) + if (CMAKE_VERSION VERSION_LESS 3.25) + set (_RUN_OUTPUT_VARIABLE "RUN_OUTPUT_VARIABLE") + else () + set (_RUN_OUTPUT_VARIABLE "RUN_OUTPUT_STDOUT_VARIABLE") + endif() TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90 LINK_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}" - RUN_OUTPUT_VARIABLE OUTPUT_VAR + ${_RUN_OUTPUT_VARIABLE} OUTPUT_VAR ) set (${RETURN_OUTPUT_VAR} ${OUTPUT_VAR}) @@ -187,10 +192,10 @@ foreach (KIND ${VAR}) " PROGRAM main USE ISO_C_BINDING - USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : stderr=>ERROR_UNIT + USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : stdout=>OUTPUT_UNIT IMPLICIT NONE INTEGER (KIND=${KIND}) a - WRITE(stderr,'(I0)') ${FC_SIZEOF_A} + WRITE(stdout,'(I0)') ${FC_SIZEOF_A} END " ) @@ -230,10 +235,10 @@ foreach (KIND ${VAR} ) " PROGRAM main USE ISO_C_BINDING - USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : stderr=>ERROR_UNIT + USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : stdout=>OUTPUT_UNIT IMPLICIT NONE REAL (KIND=${KIND}) a - WRITE(stderr,'(I0)') ${FC_SIZEOF_A} + WRITE(stdout,'(I0)') ${FC_SIZEOF_A} END " ) @@ -272,17 +277,17 @@ set (PROG_SRC3 " PROGRAM main USE ISO_C_BINDING - USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : stderr=>ERROR_UNIT + USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : stdout=>OUTPUT_UNIT IMPLICIT NONE INTEGER a REAL b DOUBLE PRECISION c - WRITE(stderr,*) ${FC_SIZEOF_A} - WRITE(stderr,*) kind(a) - WRITE(stderr,*) ${FC_SIZEOF_B} - WRITE(stderr,*) kind(b) - WRITE(stderr,*) ${FC_SIZEOF_C} - WRITE(stderr,*) kind(c) + WRITE(stdout,*) ${FC_SIZEOF_A} + WRITE(stdout,*) kind(a) + WRITE(stdout,*) ${FC_SIZEOF_B} + WRITE(stdout,*) kind(b) + WRITE(stdout,*) ${FC_SIZEOF_C} + WRITE(stdout,*) kind(c) END " ) diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 15b158d..1560bbd 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -56,7 +56,9 @@ if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og -ftrapv -fno-common") endif () else () - if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0 AND + NOT CMAKE_C_CLANG_TIDY) + # `clang-tidy` does not understand -fstdarg-opt set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstdarg-opt") endif () if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.0) @@ -66,6 +68,7 @@ if (CMAKE_COMPILER_IS_GNUCC) # This should NOT be on by default as it can cause process issues. #----------------------------------------------------------------------------- option (HDF5_ENABLE_BUILD_DIAGS "Enable color and URL extended diagnostic messages" OFF) + mark_as_advanced (HDF5_ENABLE_BUILD_DIAGS) if (HDF5_ENABLE_BUILD_DIAGS) message (STATUS "... default color and URL extended diagnostic messages enabled") else () diff --git a/config/cmake/HDFLibMacros.cmake b/config/cmake/HDFLibMacros.cmake index 6d77ab5..752d817 100644 --- a/config/cmake/HDFLibMacros.cmake +++ b/config/cmake/HDFLibMacros.cmake @@ -17,13 +17,14 @@ macro (ORIGINAL_ZLIB_LIBRARY compress_type) GIT_TAG ${ZLIB_BRANCH} ) elseif (${compress_type} MATCHES "TGZ") + message (VERBOSE "Filter ZLIB file ${ZLIB_URL}") FetchContent_Declare (HDF5_ZLIB URL ${ZLIB_URL} URL_HASH "" ) endif () FetchContent_GetProperties(HDF5_ZLIB) - if(NOT zlib_POPULATED) + if(NOT hdf5_zlib_POPULATED) FetchContent_Populate(HDF5_ZLIB) # Copy an additional/replacement files into the populated source @@ -51,6 +52,7 @@ macro (ORIGINAL_SZIP_LIBRARY compress_type encoding) GIT_TAG ${SZIP_BRANCH} ) elseif (${compress_type} MATCHES "TGZ") + message (VERBOSE "Filter SZIP file ${SZIP_URL}") FetchContent_Declare (SZIP URL ${SZIP_URL} URL_HASH "" diff --git a/config/cmake/UserMacros/Windows_MT.cmake b/config/cmake/UserMacros/Windows_MT.cmake index 15cffba..c8edbe4 100644 --- a/config/cmake/UserMacros/Windows_MT.cmake +++ b/config/cmake/UserMacros/Windows_MT.cmake @@ -47,6 +47,7 @@ endmacro () #----------------------------------------------------------------------------- option (BUILD_STATIC_CRT_LIBS "Build With Static CRT Libraries" OFF) +mark_as_advanced (BUILD_STATIC_CRT_LIBS) if (BUILD_STATIC_CRT_LIBS) TARGET_STATIC_CRT_FLAGS () endif () diff --git a/config/sanitizer/tools.cmake b/config/sanitizer/tools.cmake index 3a41ad4..88d3baf 100644 --- a/config/sanitizer/tools.cmake +++ b/config/sanitizer/tools.cmake @@ -14,101 +14,90 @@ # the License. option(CLANG_TIDY "Turns on clang-tidy processing if it is found." OFF) -option(IWYU "Turns on include-what-you-use processing if it is found." OFF) -option(CPPCHECK "Turns on cppcheck processing if it is found." OFF) +if(CLANG_TIDY) + find_program(CLANG_TIDY_EXE NAMES "clang-tidy") + mark_as_advanced(FORCE CLANG_TIDY_EXE) + if(CLANG_TIDY_EXE) + message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}") + set(CMAKE_C_CLANG_TIDY ${CLANG_TIDY_EXE} --checks=-*,clang-analyzer-*)#${ARGN}) + set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXE} --checks=-*,clang-analyzer-*)#${ARGN}) + else() + message(STATUS "clang-tidy not found!") + set(CMAKE_C_CLANG_TIDY "" CACHE STRING "" FORCE) # delete it + set(CMAKE_CXX_CLANG_TIDY "" CACHE STRING "" FORCE) # delete it + endif() +else() + #message(STATUS "clang-tidy not enabled!") + set(CMAKE_C_CLANG_TIDY + "" + CACHE STRING "" FORCE) # delete it + set(CMAKE_CXX_CLANG_TIDY + "" + CACHE STRING "" FORCE) # delete it +endif() # Adds clang-tidy checks to the compilation, with the given arguments being used # as the options set. macro(clang_tidy) if(CLANG_TIDY AND CLANG_TIDY_EXE) + set(CMAKE_C_CLANG_TIDY ${CLANG_TIDY_EXE} ${ARGN}) set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXE} ${ARGN}) endif() endmacro() +option(IWYU "Turns on include-what-you-use processing if it is found." OFF) +if(IWYU) + find_program(IWYU_EXE NAMES "include-what-you-use") + mark_as_advanced(FORCE IWYU_EXE) + if(IWYU_EXE) + message(STATUS "include-what-you-use found: ${IWYU_EXE}") + else() + message(SEND_ERROR "Cannot enable include-what-you-use, as executable not found!") + set(CMAKE_C_INCLUDE_WHAT_YOU_USE "" CACHE STRING "" FORCE) # delete it + set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "" CACHE STRING "" FORCE) # delete it + endif() +else() + #message(STATUS "include-what-you-use NOT ENABLED via 'IWYU' variable!") + set(CMAKE_C_INCLUDE_WHAT_YOU_USE "" CACHE STRING "" FORCE) # delete it + set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "" CACHE STRING "" FORCE) # delete it +endif() + # Adds include_what_you_use to the compilation, with the given arguments being # used as the options set. macro(include_what_you_use) if(IWYU AND IWYU_EXE) + set(CMAKE_C_INCLUDE_WHAT_YOU_USE ${IWYU_EXE} ${ARGN}) set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${IWYU_EXE} ${ARGN}) endif() endmacro() +option(CPPCHECK "Turns on cppcheck processing if it is found." OFF) +if(CPPCHECK) + if(CPPCHECK_EXE) + message(STATUS "cppcheck found: ${CPPCHECK_EXE}") + set(CMAKE_C_CPPCHECK + "${CPPCHECK_EXE};--enable=warning,performance,portability,missingInclude;--template=\"[{severity}][{id}] {message} {callstack} \(On {file}:{line}\)\";--suppress=missingIncludeSystem;--quiet;--verbose;--force" + ) + set(CMAKE_CXX_CPPCHECK + "${CPPCHECK_EXE};--enable=warning,performance,portability,missingInclude;--template=\"[{severity}][{id}] {message} {callstack} \(On {file}:{line}\)\";--suppress=missingIncludeSystem;--quiet;--verbose;--force" + ) + else() + message(SEND_ERROR "Cannot enable cppcheck, as executable not found!") + set(CMAKE_C_CPPCHECK "" CACHE STRING "" FORCE) # delete it + set(CMAKE_CXX_CPPCHECK "" CACHE STRING "" FORCE) # delete it + endif() +else() + # message(SEND_ERROR "cppcheck NOT ENABLED via 'CPPCHECK' variable!") + set(CMAKE_C_CPPCHECK "" CACHE STRING "" FORCE) # delete it + set(CMAKE_CXX_CPPCHECK "" CACHE STRING "" FORCE) # delete it +endif() + # Adds cppcheck to the compilation, with the given arguments being used as the # options set. macro(cppcheck) if(CPPCHECK AND CPPCHECK_EXE) + set(CMAKE_C_CPPCHECK ${CPPCHECK_EXE} ${ARGN}) set(CMAKE_CXX_CPPCHECK ${CPPCHECK_EXE} ${ARGN}) endif() endmacro() -find_program(CLANG_TIDY_EXE NAMES "clang-tidy") -mark_as_advanced(FORCE CLANG_TIDY_EXE) -if(CLANG_TIDY_EXE) - message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}") - if(NOT CLANG_TIDY) - message(STATUS "clang-tidy NOT ENABLED via 'CLANG_TIDY' variable!") - set(CMAKE_CXX_CLANG_TIDY - "" - CACHE STRING "" FORCE) # delete it - endif() -elseif(CLANG_TIDY) - message(SEND_ERROR "Cannot enable clang-tidy, as executable not found!") - set(CMAKE_CXX_CLANG_TIDY - "" - CACHE STRING "" FORCE) # delete it -else() - message(STATUS "clang-tidy not found!") - set(CMAKE_CXX_CLANG_TIDY - "" - CACHE STRING "" FORCE) # delete it -endif() - -find_program(IWYU_EXE NAMES "include-what-you-use") -mark_as_advanced(FORCE IWYU_EXE) -if(IWYU_EXE) - message(STATUS "include-what-you-use found: ${IWYU_EXE}") - if(NOT IWYU) - message(STATUS "include-what-you-use NOT ENABLED via 'IWYU' variable!") - set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE - "" - CACHE STRING "" FORCE) # delete it - endif() -elseif(IWYU) - message( - SEND_ERROR "Cannot enable include-what-you-use, as executable not found!") - set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE - "" - CACHE STRING "" FORCE) # delete it -else() - message(STATUS "include-what-you-use not found!") - set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE - "" - CACHE STRING "" FORCE) # delete it -endif() - -find_program(CPPCHECK_EXE NAMES "cppcheck") -mark_as_advanced(FORCE CPPCHECK_EXE) -if(CPPCHECK_EXE) - message(STATUS "cppcheck found: ${CPPCHECK_EXE}") - if(CPPCHECK) - set(CMAKE_CXX_CPPCHECK - "${CPPCHECK_EXE};--enable=warning,performance,portability,missingInclude;--template=\"[{severity}][{id}] {message} {callstack} \(On {file}:{line}\)\";--suppress=missingIncludeSystem;--quiet;--verbose;--force" - ) - endif() - if(NOT CPPCHECK) - message(STATUS "cppcheck NOT ENABLED via 'CPPCHECK' variable!") - set(CMAKE_CXX_CPPCHECK - "" - CACHE STRING "" FORCE) # delete it - endif() -elseif(CPPCHECK) - message(SEND_ERROR "Cannot enable cppcheck, as executable not found!") - set(CMAKE_CXX_CPPCHECK - "" - CACHE STRING "" FORCE) # delete it -else() - message(STATUS "cppcheck not found!") - set(CMAKE_CXX_CPPCHECK - "" - CACHE STRING "" FORCE) # delete it -endif() diff --git a/doxygen/Doxyfile.in b/doxygen/Doxyfile.in index 66e4826..cddf17c 100644 --- a/doxygen/Doxyfile.in +++ b/doxygen/Doxyfile.in @@ -625,7 +625,7 @@ WARN_NO_PARAMDOC = NO # a warning is encountered. # The default value is: NO. -WARN_AS_ERROR = NO +WARN_AS_ERROR = FAIL_ON_WARNINGS # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which diff --git a/doxygen/dox/LearnBasics3.dox b/doxygen/dox/LearnBasics3.dox index 06afacd..7487458 100644 --- a/doxygen/dox/LearnBasics3.dox +++ b/doxygen/dox/LearnBasics3.dox @@ -945,7 +945,7 @@ For a more complete script (and to help resolve issues) see the script provided \subsection subsecLBCompilingCMakeExamples HDF5 Examples The installed HDF5 can be verified by compiling the HDF5 Examples project, included with the CMake built HDF5 binaries -in the share folder or you can go to the HDF5 Examples github repository. +in the share folder or you can go to the HDF5 Examples github repository. Go into the share directory and follow the instructions in USING_CMake_examples.txt to build the examples. diff --git a/doxygen/dox/ReferenceManual.dox b/doxygen/dox/ReferenceManual.dox index 40f8b8a..86a7b2c 100644 --- a/doxygen/dox/ReferenceManual.dox +++ b/doxygen/dox/ReferenceManual.dox @@ -31,10 +31,6 @@ The functions provided by the HDF5 API are grouped into the following
- * This class is a container for the information reported about an HDF5 Object - * from the H5Gget_obj_info() method. - *
- * The fileno and objno fields contain four values which uniquely identify an - * object among those HDF5 files which are open: if all four values are the same - * between two objects, then the two objects are the same (provided both files - * are still open). The nlink field is the number of hard links to the object or - * zero when information is being returned about a symbolic link (symbolic links - * do not have hard links but all other objects always have at least one). The - * type field contains the type of the object, one of H5G_GROUP, H5G_DATASET, or - * H5G_LINK. The mtime field contains the modification time. If information is - * being returned about a symbolic link then linklen will be the length of the - * link value (the name of the pointed-to object with the null terminator); - * otherwise linklen will be zero. Other fields may be added to this structure - * in the future. - * - * @deprecated Not for public use. It is not used by the library. - * This class assumes that an object can contain four values which uniquely identify an - * object among those HDF5 files which are open. This is no longer valid in future - * HDF5 releases. - */ - -@Deprecated -public class HDF5GroupInfo { - long[] fileno; - long[] objno; - int nlink; - int type; - long mtime; - int linklen; - - /** - * Container for the information reported about an HDF5 Object - * from the H5Gget_obj_info() method - */ - public HDF5GroupInfo() - { - fileno = new long[2]; - objno = new long[2]; - nlink = -1; - type = -1; - mtime = 0; - linklen = 0; - } - - /** - * Sets the HDF5 group information. Used by the JHI5. - * - * @param fn - * File id number - * @param on - * Object id number - * @param nl - * Number of links - * @param t - * Type of the object - * @param mt - * Modification time - * @param len - * Length of link - **/ - public void setGroupInfo(long[] fn, long[] on, int nl, int t, long mt, int len) - { - fileno = fn; - objno = on; - nlink = nl; - type = t; - mtime = mt; - linklen = len; - } - - /** Resets all the group information to defaults. */ - public void reset() - { - fileno[0] = 0; - fileno[1] = 0; - objno[0] = 0; - objno[1] = 0; - nlink = -1; - type = -1; - mtime = 0; - linklen = 0; - } - - /** - * fileno accessors - * @return the file number if successful - */ - public long[] getFileno() { return fileno; } - - /** - * accessors - * @return the object number if successful - */ - public long[] getObjno() { return objno; } - - /** - * accessors - * @return type of group if successful - */ - public int getType() { return type; } - - /** - * accessors - * @return the number of links in the group if successful - */ - public int getNlink() { return nlink; } - - /** - * accessors - * @return the modified time value if successful - */ - public long getMtime() { return mtime; } - - /** - * accessors - * @return a length of link name if successful - */ - public int getLinklen() { return linklen; } - - /** - * The fileno and objno fields contain four values which uniquely identify - * an object among those HDF5 files. - */ - @Override - public boolean equals(Object obj) - { - if (!(obj instanceof HDF5GroupInfo)) { - return false; - } - - HDF5GroupInfo target = (HDF5GroupInfo)obj; - if ((fileno[0] == target.fileno[0]) && (fileno[1] == target.fileno[1]) && - (objno[0] == target.objno[0]) && (objno[1] == target.objno[1])) { - return true; - } - else { - return false; - } - } - - /** - * Returns the object id. - * - * @return the object id - */ - public long getOID() { return objno[0]; } - - /** - * /** Converts this object to a String representation. - * - * @return a string representation of this object - */ - @Override - public String toString() - { - String fileStr = "fileno=null"; - String objStr = "objno=null"; - - if (fileno != null) { - fileStr = "fileno[0]=" + fileno[0] + ",fileno[1]=" + fileno[1]; - } - - if (objno != null) { - objStr = "objno[0]=" + objno[0] + ",objno[1]=" + objno[1]; - } - - return getClass().getName() + "[" + fileStr + "," + objStr + ",type=" + type + ",nlink=" + nlink + - ",mtime=" + mtime + ",linklen=" + linklen + "]"; - } -} diff --git a/java/src/hdf/hdf5lib/HDFArray.java b/java/src/hdf/hdf5lib/HDFArray.java index 28d5117..637a896 100644 --- a/java/src/hdf/hdf5lib/HDFArray.java +++ b/java/src/hdf/hdf5lib/HDFArray.java @@ -455,6 +455,7 @@ public class HDFArray { new HDF5JavaException("HDFArray: unsupported Object type: " + ArrayDescriptor.NT); throw(ex); } + break; } // end of statement for arrays of boxed objects default: HDF5JavaException ex = @@ -527,6 +528,7 @@ public class HDFArray { new HDF5JavaException("HDFArray: unsupported Object type: " + ArrayDescriptor.NT); throw(ex); } + break; } // end of statement for arrays of boxed numerics } // end of switch statement for arrays of primitives diff --git a/java/src/hdf/hdf5lib/callbacks/package-info.java b/java/src/hdf/hdf5lib/callbacks/package-info.java index 5ef3fab..bf7bf3c 100644 --- a/java/src/hdf/hdf5lib/callbacks/package-info.java +++ b/java/src/hdf/hdf5lib/callbacks/package-info.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * diff --git a/java/src/hdf/hdf5lib/exceptions/package-info.java b/java/src/hdf/hdf5lib/exceptions/package-info.java index 2ac7806..784e57d 100644 --- a/java/src/hdf/hdf5lib/exceptions/package-info.java +++ b/java/src/hdf/hdf5lib/exceptions/package-info.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * @@ -29,4 +28,4 @@ * error code returned by the HDF5 library. * */ -package hdf.hdf5lib.exceptions; \ No newline at end of file +package hdf.hdf5lib.exceptions; diff --git a/java/src/hdf/hdf5lib/package-info.java b/java/src/hdf/hdf5lib/package-info.java index 7ae4df9..e742197 100644 --- a/java/src/hdf/hdf5lib/package-info.java +++ b/java/src/hdf/hdf5lib/package-info.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * diff --git a/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java b/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java index 181d681..9861334 100644 --- a/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java +++ b/java/src/hdf/hdf5lib/structs/H5FD_hdfs_fapl_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * diff --git a/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java b/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java index 67c2463..62b2921 100644 --- a/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java +++ b/java/src/hdf/hdf5lib/structs/H5FD_ros3_fapl_t.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * diff --git a/java/src/hdf/hdf5lib/structs/package-info.java b/java/src/hdf/hdf5lib/structs/package-info.java index a3ec6cd..7bd3dee 100644 --- a/java/src/hdf/hdf5lib/structs/package-info.java +++ b/java/src/hdf/hdf5lib/structs/package-info.java @@ -1,6 +1,5 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * - * * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c index 8cfecc5..af06bdc 100644 --- a/java/src/jni/h5fImp.c +++ b/java/src/jni/h5fImp.c @@ -188,7 +188,7 @@ done: * Signature: (Ljava/lang/String;J)Z */ JNIEXPORT jboolean JNICALL -Java_hdf_hdf5lib_H5_H5Fis_1accessible(JNIEnv *env, jclass clss, jstring name, jlong file_id) +Java_hdf_hdf5lib_H5_H5Fis_1accessible(JNIEnv *env, jclass clss, jstring name, jlong fapl_id) { const char *fileName = NULL; htri_t bval = JNI_FALSE; @@ -200,7 +200,7 @@ Java_hdf_hdf5lib_H5_H5Fis_1accessible(JNIEnv *env, jclass clss, jstring name, jl PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Fis_accessible: file name not pinned"); - if ((bval = H5Fis_accessible(fileName, (hid_t)file_id)) < 0) + if ((bval = H5Fis_accessible(fileName, (hid_t)fapl_id)) < 0) H5_LIBRARY_ERROR(ENVONLY); bval = (bval > 0) ? JNI_TRUE : JNI_FALSE; @@ -741,7 +741,7 @@ Java_hdf_hdf5lib_H5_H5Fset_1dset_1no_1attrs_1hint(JNIEnv *env, jclass clss, jlon done: return; -} +} /* end Java_hdf_hdf5lib_H5_H5Fset_1dset_1no_1attrs_1hint */ /* * Class: hdf_hdf5lib_H5 @@ -764,7 +764,7 @@ Java_hdf_hdf5lib_H5_H5Fget_1dset_1no_1attrs_1hint(JNIEnv *env, jclass clss, jlon done: return bval; -} +} /* end Java_hdf_hdf5lib_H5_H5Fget_1dset_1no_1attrs_1hint */ /* * Class: hdf_hdf5lib_H5 diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c index 5389600..67f4850 100644 --- a/java/src/jni/h5lImp.c +++ b/java/src/jni/h5lImp.c @@ -277,7 +277,7 @@ done: JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Lget_1info(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jlong access_id) { - H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, 0}; + H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, {{{0}}}}; const char *linkName = NULL; jvalue args[5]; herr_t status = FAIL; @@ -340,7 +340,7 @@ JNIEXPORT jobject JNICALL Java_hdf_hdf5lib_H5_H5Lget_1info_1by_1idx(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jint index_field, jint order, jlong link_n, jlong access_id) { - H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, 0}; + H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, {{{0}}}}; const char *groupName = NULL; jvalue args[5]; herr_t status = FAIL; @@ -454,7 +454,7 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5Lget_1value(JNIEnv *env, jclass clss, jlong loc_id, jstring name, jobjectArray link_value, jlong access_id) { - H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, 0}; + H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, {{{0}}}}; const char *file_name = NULL; const char *obj_name = NULL; const char *linkName = NULL; @@ -544,7 +544,7 @@ Java_hdf_hdf5lib_H5_H5Lget_1value_1by_1idx(JNIEnv *env, jclass clss, jlong loc_i jint index_field, jint order, jlong link_n, jobjectArray link_value, jlong access_id) { - H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, 0}; + H5L_info2_t infobuf = {H5L_TYPE_ERROR, FALSE, -1, H5T_CSET_ERROR, {{{0}}}}; const char *file_name = NULL; const char *obj_name = NULL; const char *grpName = NULL; diff --git a/java/src/jni/h5pDAPLImp.c b/java/src/jni/h5pDAPLImp.c index 01108b3..666f47d 100644 --- a/java/src/jni/h5pDAPLImp.c +++ b/java/src/jni/h5pDAPLImp.c @@ -80,6 +80,8 @@ Java_hdf_hdf5lib_H5_H5Pget_1chunk_1cache(JNIEnv *env, jclass clss, jlong dapl, j if (NULL != rdcc_nbytes) PIN_LONG_ARRAY(ENVONLY, rdcc_nbytes, nbytesArray, &isCopy, "H5Pget_chunk_cache: nbytesArray array not pinned"); + if (NULL == nbytesArray) + H5_NULL_ARGUMENT_ERROR(ENVONLY, "nbytesArray should not be NULL after pinning"); { /* direct cast (size_t *)variable fails on 32-bit environment */ diff --git a/java/src/jni/h5pFAPLImp.c b/java/src/jni/h5pFAPLImp.c index f094aaf..80ed6c6 100644 --- a/java/src/jni/h5pFAPLImp.c +++ b/java/src/jni/h5pFAPLImp.c @@ -1252,6 +1252,8 @@ Java_hdf_hdf5lib_H5_H5Pget_1cache(JNIEnv *env, jclass clss, jlong plist, jintArr if (NULL != rdcc_nbytes) PIN_LONG_ARRAY(ENVONLY, rdcc_nbytes, nbytesArray, &isCopy, "H5Pget_cache: nbytesArray array not pinned"); + if (NULL == nbytesArray) + H5_NULL_ARGUMENT_ERROR(ENVONLY, "nbytesArray should not be NULL after pinning"); { /* direct cast (size_t *)variable fails on 32-bit environment */ diff --git a/java/src/jni/h5tImp.c b/java/src/jni/h5tImp.c index a81d270..3a3a288 100644 --- a/java/src/jni/h5tImp.c +++ b/java/src/jni/h5tImp.c @@ -1687,7 +1687,7 @@ Java_hdf_hdf5lib_H5_H5Tflush(JNIEnv *env, jclass clss, jlong loc_id) done: return; -} +} /* end Java_hdf_hdf5lib_H5_H5Tflush */ /* * Class: hdf_hdf5lib_H5 diff --git a/m4/aclocal_fc.f90 b/m4/aclocal_fc.f90 index bcefab5..68a8f1b 100644 --- a/m4/aclocal_fc.f90 +++ b/m4/aclocal_fc.f90 @@ -82,7 +82,7 @@ END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE !---- START ----- Determine the available KINDs for REALs and INTEGERs PROGRAM FC_AVAIL_KINDS - USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : stderr=>ERROR_UNIT + USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : stdout=>OUTPUT_UNIT IMPLICIT NONE INTEGER :: ik, jk, k, kk, max_decimal_prec INTEGER :: prev_rkind, num_rkinds = 1, num_ikinds = 1 @@ -102,11 +102,11 @@ PROGRAM FC_AVAIL_KINDS ENDDO DO k = 1, num_ikinds - WRITE(stderr,'(I0)', ADVANCE='NO') list_ikinds(k) + WRITE(stdout,'(I0)', ADVANCE='NO') list_ikinds(k) IF(k.NE.num_ikinds)THEN - WRITE(stderr,'(A)',ADVANCE='NO') ',' + WRITE(stdout,'(A)',ADVANCE='NO') ',' ELSE - WRITE(stderr,'()') + WRITE(stdout,'()') ENDIF ENDDO @@ -139,17 +139,17 @@ PROGRAM FC_AVAIL_KINDS ENDDO prec DO k = 1, num_rkinds - WRITE(stderr,'(I0)', ADVANCE='NO') list_rkinds(k) + WRITE(stdout,'(I0)', ADVANCE='NO') list_rkinds(k) IF(k.NE.num_rkinds)THEN - WRITE(stderr,'(A)',ADVANCE='NO') ',' + WRITE(stdout,'(A)',ADVANCE='NO') ',' ELSE - WRITE(stderr,'()') + WRITE(stdout,'()') ENDIF ENDDO - WRITE(stderr,'(I0)') max_decimal_prec - WRITE(stderr,'(I0)') num_ikinds - WRITE(stderr,'(I0)') num_rkinds + WRITE(stdout,'(I0)') max_decimal_prec + WRITE(stdout,'(I0)') num_ikinds + WRITE(stdout,'(I0)') num_rkinds END PROGRAM FC_AVAIL_KINDS !---- END ----- Determine the available KINDs for REALs and INTEGERs diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 06d1c34..48a8e60 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -409,7 +409,15 @@ Bug Fixes since HDF5-1.12.2 release Java Library ------------ - - + - Fixed switch case 'L' block missing a break statement. + + The HDF5Array.arrayify method is missing a break statement in the case 'L': section + which causes it to fall through and throw an HDF5JavaException when attempting to + read an Array[Array[Long]]. + + The error was fixed by inserting a break statement at the end of the case 'L': sections. + + Fixes GitHub issue #3056 Configuration diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h index 13a6d34..32d4f64 100644 --- a/src/H5Dpublic.h +++ b/src/H5Dpublic.h @@ -279,7 +279,7 @@ extern "C" { * * \p loc_id may specify a file, group, dataset, named datatype, * or attribute. If an attribute, dataset, or named datatype is - * specified then the dataset will be created at the location + * specified, then the dataset will be created at the location * where the attribute, dataset, or named datatype is attached. * * \p name may be either an absolute path in the file or a relative @@ -290,7 +290,7 @@ extern "C" { * file location where the dataset will be created, the datatype * is copied and converted to a transient type. * - * The link creation property list, \p lcpl_id, governs creation + * The link creation property list, \p lcpl_id, governs the creation * of the link(s) by which the new dataset is accessed and the * creation of any intermediate groups that may be missing. * @@ -334,12 +334,12 @@ H5_DLL hid_t H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t spa * * \p loc_id may specify a file, group, dataset, named datatype, * or attribute. If an attribute, dataset, or named datatype is - * specified then the dataset will be created at the location + * specified, then the dataset will be created at the location * where the attribute, dataset, or named datatype is attached. * * The dataset’s datatype and dataspace are specified by * \p type_id and \p space_id, respectively. These are the - * datatype and dataspace of the dataset as it will exist in + * datatype and dataspace of the dataset as they will exist in * the file, which may differ from the datatype and dataspace * in application memory. * @@ -668,7 +668,7 @@ H5_DLL herr_t H5Dget_chunk_info_by_coord(hid_t dset_id, const hsize_t *offset, u * context \p op_data. * * \par Example - * For each chunk, print the allocated chunk size (0 for un-allocated chunks). + * For each chunk, print the allocated chunk size (0 for unallocated chunks). * \snippet H5D_examples.c H5Dchunk_iter_cb * Iterate over all chunked datasets and chunks in a file. * \snippet H5D_examples.c H5Ovisit_cb @@ -700,22 +700,22 @@ H5_DLL herr_t H5Dchunk_iter(hid_t dset_id, hid_t dxpl_id, H5D_chunk_iter_op_t cb * specified by the index \p index. The chunk belongs to a set of * chunks in the selection specified by \p fspace_id. If the queried * chunk does not exist in the file, the size will be set to 0 and - * address to #HADDR_UNDEF. The value pointed to by filter_mask will + * address to HADDR_UNDEF. The value pointed to by filter_mask will * not be modified. \c NULL can be passed in for any \p out parameters. * * \p chk_idx is the chunk index in the selection. The index value * may have a value of 0 up to the number of chunks stored in - * the file that have a nonempty intersection with the file - * dataspace selection + * the file that has a nonempty intersection with the file + * dataspace selection. * * \note As of 1.10.5, the dataspace intersection is not yet - * supported, hence, the index is of all the written chunks. + * supported. Hence, the index is of all the written chunks. * * \p fspace_id specifies the file dataspace selection. It is - * intended to take #H5S_ALL for specifying the current selection. + * intended to take #H5S_ALL to specify the current selection. * * \note Please be aware that this function currently does not - * support non-trivial selections, thus \p fspace_id has no + * support non-trivial selections; thus \p fspace_id has no * effect. Also, the implementation does not handle the #H5S_ALL * macro correctly. As a workaround, an application can get * the dataspace for the dataset using H5Dget_space() and pass that @@ -735,7 +735,7 @@ H5_DLL herr_t H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t chk_idx, * * \dset_id * - * \return Returns the offset in bytes; otherwise, returns #HADDR_UNDEF, + * \return Returns the offset in bytes; otherwise, returns HADDR_UNDEF, * a negative value. * * \details H5Dget_offset() returns the address in the file of @@ -983,7 +983,7 @@ H5_DLL herr_t H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid * the file. Only one chunk can be written with this function. * * \p filters is a mask providing a record of which filters are - * used with the the chunk. The default value of the mask is + * used with the chunk. The default value of the mask is * zero (0), indicating that all enabled filters are applied. A * filter is skipped if the bit corresponding to the filter’s * position in the pipeline (0 ≤ position < 32) is turned on. @@ -1102,6 +1102,8 @@ H5_DLL herr_t H5Dread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, * be restarted at the point of exit; a second H5Diterate() * call will always restart at the beginning. * + * \warning Modifying the selection of \p space_id during iteration + * will lead to undefined behavior. * * \since 1.10.2 * @@ -1304,7 +1306,7 @@ H5_DLL herr_t H5Drefresh(hid_t dset_id); * \p op and scatters it to the supplied buffer \p dst_buf in a * manner similar to data being written to a dataset. * - * \p dst_space_id is a dataspace which defines the extent of \p + * \p dst_space_id is a dataspace that defines the extent of \p * dst_buf and the selection within it to scatter the data to. * * \p type_id is the datatype of the data to be scattered in both @@ -1361,7 +1363,7 @@ H5_DLL herr_t H5Dscatter(H5D_scatter_func_t op, void *op_data, hid_t type_id, hi * enough to hold all the data if the callback function \p op is * not provided. * - * \p op is a callback function which handles the gathered data. + * \p op is a callback function that handles the gathered data. * It is optional if \p dst_buf is large enough to hold all of the * gathered data; required otherwise. * @@ -1407,10 +1409,12 @@ H5_DLL herr_t H5Dgather(hid_t src_space_id, const void *src_buf, hid_t type_id, */ H5_DLL herr_t H5Dclose(hid_t dset_id); +/// \cond DEV /* Internal API routines */ H5_DLL herr_t H5Ddebug(hid_t dset_id); H5_DLL herr_t H5Dformat_convert(hid_t dset_id); H5_DLL herr_t H5Dget_chunk_index_type(hid_t did, H5D_chunk_index_t *idx_type); +/// \endcond /* Symbols defined for compatibility with previous versions of the HDF5 API. * @@ -1489,10 +1493,10 @@ H5_DLL herr_t H5Dget_chunk_index_type(hid_t did, H5D_chunk_index_t *idx_type); * * H5Dcreate() and H5Dcreate_anon() return a dataset identifier for * success or a negative value for failure. The dataset identifier - * should eventually be closed by calling H5Dclose() to release + * should eventually be closed by calling H5Dclose() to release the * resources it uses. * - * See H5Dcreate_anon() for discussion of the differences between + * See H5Dcreate_anon() for a discussion of the differences between * H5Dcreate() and H5Dcreate_anon(). * * The HDF5 library provides flexible means of specifying a fill value, @@ -1568,7 +1572,7 @@ H5_DLL hid_t H5Dopen1(hid_t loc_id, const char *name); * * This function ensures that the dataset dimensions are of at least * the sizes specified in size. The function H5Dset_extent() must be - * used if the dataset dimension sizes are are to be reduced. + * used if the dataset dimension sizes are to be reduced. * * \version 1.8.0 Function deprecated in this release. Parameter size * syntax changed to \Code{const hsize_t size[]} in this release. @@ -1596,7 +1600,7 @@ H5_DLL herr_t H5Dextend(hid_t dset_id, const hsize_t size[]); * The \p type_id must be the datatype stored in the buffer. The \p * space_id describes the selection for the memory buffer to free the * VL datatypes within. The \p dxpl_id is the dataset transfer property - * list which was used for the I/O transfer to create the buffer. And + * list that was used for the I/O transfer to create the buffer. And * \p buf is the pointer to the buffer to be reclaimed. * * The VL structures (\ref hvl_t) in the user's buffer are modified to diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index 195495c..65b30b8 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -385,7 +385,7 @@ H5_DLL hid_t H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_ * opened. * * The \p fapl_id parameter specifies the file access property list. - * Use of #H5P_DEFAULT specifies that default I/O access properties + * The use of #H5P_DEFAULT specifies that default I/O access properties * are to be used. * * The \p flags parameter specifies whether the file will be opened in @@ -495,7 +495,7 @@ H5_DLL hid_t H5Freopen(hid_t file_id); * \snippet H5F_examples.c flush * * \attention HDF5 does not possess full control over buffering. H5Fflush() - * flushes the internal HDF5 buffers then asks the operating system + * flushes the internal HDF5 buffers and then asks the operating system * (the OS) to flush the system buffers for the open files. After * that, the OS is responsible for ensuring that the data is * actually flushed to disk. @@ -522,7 +522,7 @@ H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope); * \snippet H5F_examples.c minimal * * \note \Bold{Delayed close:} Note the following deviation from the - * above-described behavior. If H5Fclose() is called for a file but one + * above-described behavior. If H5Fclose() is called for a file, but one * or more objects within the file remain open, those objects will remain * accessible until they are individually closed. Thus, if the dataset * \c data_sample is open when H5Fclose() is called for the file @@ -531,7 +531,7 @@ H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope); * automatically closed once all objects in the file have been closed.\n * Be warned, however, that there are circumstances where it is not * possible to delay closing a file. For example, an MPI-IO file close is - * a collective call; all of the processes that opened the file must + * a collective call; all of the processes that open the file must * close it collectively. The file cannot be closed at some time in the * future by each process in an independent fashion. Another example is * that an application using an AFS token-based file access privilege may @@ -1303,7 +1303,7 @@ H5_DLL herr_t H5Fstart_swmr_write(hid_t file_id); * \snippet this H5F_sect_info_t_snip * * This routine retrieves free-space section information for \p nsects - * sections or at most the maximum number of sections in the specified + * sections or, at most, the maximum number of sections in the specified * free-space manager. If the number of sections is not known, a * preliminary H5Fget_free_sections() call can be made by setting \p * sect_info to NULL and the total number of free-space sections for @@ -1569,7 +1569,7 @@ H5_DLL herr_t H5Fget_page_buffering_stats(hid_t file_id, unsigned accesses[2], u * \brief Obtains information about a cache image if it exists * * \file_id - * \param[out] image_addr Offset of the cache image if it exists, or #HADDR_UNDEF if it does not + * \param[out] image_addr Offset of the cache image if it exists, or HADDR_UNDEF if it does not * \param[out] image_size Length of the cache image if it exists, or 0 if it does not * \returns \herr_t * @@ -1611,7 +1611,7 @@ H5_DLL herr_t H5Fget_mdc_image_info(hid_t file_id, haddr_t *image_addr, hsize_t * file_id. This setting is used to inform the library to create * minimized dataset object headers when \c TRUE. * - * The setting's value is returned in the boolean pointer minimize. + * The setting's value is returned in the boolean pointer minimized. * * \since 1.10.5 * @@ -1810,7 +1810,7 @@ H5_DLL herr_t H5Fget_info1(hid_t obj_id, H5F_info1_t *file_info); /** * \ingroup H5F * - * \brief Sets thelatest version of the library to be used for writing objects + * \brief Sets the latest version of the library to be used for writing objects * * \file_id * \param[in] latest_format Latest format flag diff --git a/src/H5Rpublic.h b/src/H5Rpublic.h index becbd15..5d2701c 100644 --- a/src/H5Rpublic.h +++ b/src/H5Rpublic.h @@ -75,7 +75,7 @@ typedef haddr_t hobj_ref_t; /** * Buffer to store heap ID and index * - * This needs to be large enough to store largest #haddr_t in a worst case + * This needs to be large enough to store largest haddr_t in a worst case * machine (8 bytes currently) plus an int. * * \deprecated Dataset region reference type that is used with deprecated @@ -259,7 +259,7 @@ H5_DLL herr_t H5Rdestroy(H5R_ref_t *ref_ptr); * \snippet this H5R_type_t_snip * * Note that #H5R_OBJECT1 and #H5R_DATASET_REGION1 can never be - * associated to an \ref H5R_ref_t reference and can therefore never be + * associated with an \ref H5R_ref_t reference and can, therefore, never be * returned through that function. * * \ref H5R_ref_t is defined in H5Rpublic.h as: @@ -302,7 +302,7 @@ H5_DLL htri_t H5Requal(const H5R_ref_t *ref1_ptr, const H5R_ref_t *ref2_ptr); * \return \herr_t * * \details H5Rcopy() creates a copy of an existing reference. - * \p src_ref_ptr points to the reference to copy and \p dst_ref_ptr is the + * \p src_ref_ptr points to the reference to copy, and \p dst_ref_ptr is the * pointer to the destination reference. * */ @@ -336,7 +336,7 @@ H5_DLL herr_t H5Rcopy(const H5R_ref_t *src_ref_ptr, H5R_ref_t *dst_ref_ptr); * * The object opened with this function should be closed when it * is no longer needed so that resource leaks will not develop. Use - * the appropriate close function such as H5Oclose() or H5Dclose() + * the appropriate close function, such as H5Oclose() or H5Dclose() * for datasets. * */ @@ -574,7 +574,7 @@ H5_DLL ssize_t H5Rget_attr_name(const H5R_ref_t *ref_ptr, char *name, size_t siz * * A \Emph{reference type} is the type of reference, either an object * reference or a dataset region reference. An \Emph{object reference} - * points to an HDF5 object while a \Emph{dataset region reference} + * points to an HDF5 object, while a \Emph{dataset region reference} * points to a defined region within a dataset. * * The \Emph{referenced object} is the object the reference points @@ -646,7 +646,7 @@ H5_DLL H5G_obj_t H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *ref * * The object opened with this function should be closed when it is no * longer needed so that resource leaks will not develop. Use the - * appropriate close function such as H5Oclose() or H5Dclose() for + * appropriate close function, such as H5Oclose() or H5Dclose() for * datasets. * * \version 1.10.0 Function H5Rdereference() renamed to H5Rdereference1() and @@ -783,7 +783,7 @@ H5_DLL herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *ref, H * * The object opened with this function should be closed when it is no * longer needed so that resource leaks will not develop. Use the - * appropriate close function such as H5Oclose() or H5Dclose() for + * appropriate close function, such as H5Oclose() or H5Dclose() for * datasets. * * \since 1.10.0 -- cgit v0.12