diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 73736ebeba6..729fc42e1e6 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -612,6 +612,13 @@ Bug Fixes since HDF5-1.14.0 release Fixes #3003 + - Fixed error when overwriting certain nested variable length types + + Previously, when using a datatype that included a variable length type + within a compound or array within another variable length type, and + overwriting data with a shorter (top level) variable length sequence, an + error could occur. This has been fixed. + - Fixed asserts raised by large values of H5Pset_est_link_info() parameters If large values for est_num_entries and/or est_name_len were passed @@ -1564,6 +1571,9 @@ Known Problems in the HDF5 source. Please report any new problems found to help@hdfgroup.org. + File space may not be released when overwriting or deleting certain nested + variable length or reference types. + CMake vs. Autotools installations ================================= diff --git a/src/H5A.c b/src/H5A.c index a3bcf011520..1db7fd3eb48 100644 --- a/src/H5A.c +++ b/src/H5A.c @@ -25,9 +25,7 @@ #include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ #include "H5ESprivate.h" /* Event Sets */ -#include "H5FLprivate.h" /* Free Lists */ #include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ #include "H5Opkg.h" /* Object headers */ #include "H5Sprivate.h" /* Dataspace functions */ #include "H5VLprivate.h" /* Virtual Object Layer */ diff --git a/src/H5AC.c b/src/H5AC.c index b752803ed55..6610af88d09 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -40,7 +40,6 @@ #include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* Files */ -#include "H5Iprivate.h" /* IDs */ #include "H5Pprivate.h" /* Property lists */ #include "H5SLprivate.h" /* Skip Lists */ diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c index 7ff2b06d69b..25dd6627d6d 100644 --- a/src/H5Adeprec.c +++ b/src/H5Adeprec.c @@ -35,7 +35,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Apkg.h" /* Attributes */ #include "H5CXprivate.h" /* API Contexts */ -#include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5Iprivate.h" /* IDs */ #include "H5Opkg.h" /* Object headers */ diff --git a/src/H5Aint.c b/src/H5Aint.c index 160e359f309..15f025c6050 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -31,8 +31,6 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5Apkg.h" /* Attributes */ -#include "H5CXprivate.h" /* API Contexts */ -#include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ diff --git a/src/H5Atest.c b/src/H5Atest.c index 1d18b444cbc..141f5110160 100644 --- a/src/H5Atest.c +++ b/src/H5Atest.c @@ -31,7 +31,6 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5Apkg.h" /* Attributes */ -#include "H5ACprivate.h" /* Metadata cache */ #include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ #include "H5Iprivate.h" /* IDs */ diff --git a/src/H5B.c b/src/H5B.c index 041acec0a4a..7b71b5f9719 100644 --- a/src/H5B.c +++ b/src/H5B.c @@ -101,10 +101,8 @@ #include "H5Bpkg.h" /* B-link trees */ #include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ #include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ -#include "H5Pprivate.h" /* Property lists */ /****************/ /* Local Macros */ diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c index 83a70eb5311..0977a4c96d2 100644 --- a/src/H5B2dbg.c +++ b/src/H5B2dbg.c @@ -28,10 +28,9 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5B2pkg.h" /* v2 B-trees */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5FLprivate.h" /* Free Lists */ +#include "H5private.h" /* Generic Functions */ +#include "H5B2pkg.h" /* v2 B-trees */ +#include "H5Eprivate.h" /* Error handling */ /****************/ /* Local Macros */ diff --git a/src/H5CX.c b/src/H5CX.c index 0c6c8733703..cdc6467a09f 100644 --- a/src/H5CX.c +++ b/src/H5CX.c @@ -300,9 +300,9 @@ typedef struct H5CX_t { bool no_selection_io_cause_valid; /* Whether reason for not performing selection I/O is valid */ uint32_t - actual_selection_io_mode; /* Actual selection I/O mode used (H5D_ACTUAL_SELECTION_IO_MODE_NAME) */ - hbool_t actual_selection_io_mode_set; /* Whether actual selection I/O mode is set */ - hbool_t actual_selection_io_mode_valid; /* Whether actual selection I/O mode is valid */ + actual_selection_io_mode; /* Actual selection I/O mode used (H5D_ACTUAL_SELECTION_IO_MODE_NAME) */ + bool actual_selection_io_mode_set; /* Whether actual selection I/O mode is set */ + bool actual_selection_io_mode_valid; /* Whether actual selection I/O mode is valid */ /* Cached LCPL properties */ H5T_cset_t encoding; /* Link name character encoding */ diff --git a/src/H5Cimage.c b/src/H5Cimage.c index b9690540afd..ec1af787d5e 100644 --- a/src/H5Cimage.c +++ b/src/H5Cimage.c @@ -40,7 +40,6 @@ #include "H5Fpkg.h" /* Files */ #include "H5FDprivate.h" /* File drivers */ #include "H5FLprivate.h" /* Free Lists */ -#include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ /****************/ diff --git a/src/H5Ctag.c b/src/H5Ctag.c index 8da6c137fdc..71eb24d2577 100644 --- a/src/H5Ctag.c +++ b/src/H5Ctag.c @@ -37,7 +37,6 @@ #include "H5Eprivate.h" /* Error Handling */ #include "H5Fpkg.h" /* Files */ #include "H5FLprivate.h" /* Free Lists */ -#include "H5MMprivate.h" /* Memory management */ /****************/ /* Local Macros */ diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c index 4f8a867974e..6c32c26f345 100644 --- a/src/H5Dbtree.c +++ b/src/H5Dbtree.c @@ -31,7 +31,6 @@ #include "H5Fprivate.h" /* Files */ #include "H5FDprivate.h" /* File drivers */ #include "H5FLprivate.h" /* Free Lists */ -#include "H5Iprivate.h" /* IDs */ #include "H5MFprivate.h" /* File space management */ #include "H5MMprivate.h" /* Memory management */ #include "H5Oprivate.h" /* Object headers */ diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c index 0407736810c..087488184cc 100644 --- a/src/H5Dcontig.c +++ b/src/H5Dcontig.c @@ -36,9 +36,7 @@ #include "H5Iprivate.h" /* IDs */ #include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ -#include "H5FOprivate.h" /* File objects */ #include "H5Oprivate.h" /* Object headers */ -#include "H5Pprivate.h" /* Property lists */ #include "H5PBprivate.h" /* Page Buffer */ #include "H5VMprivate.h" /* Vector and array functions */ diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c index 22777b434cf..d8a9234675c 100644 --- a/src/H5Ddbg.c +++ b/src/H5Ddbg.c @@ -20,7 +20,6 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ -#include "H5CXprivate.h" /* API Contexts */ #include "H5Dpkg.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5Iprivate.h" /* IDs */ diff --git a/src/H5Dfill.c b/src/H5Dfill.c index 12cc3eaebf5..447a22dfa9b 100644 --- a/src/H5Dfill.c +++ b/src/H5Dfill.c @@ -29,11 +29,9 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ -#include "H5CXprivate.h" /* API Contexts */ #include "H5Dpkg.h" /* Dataset functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free Lists */ -#include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5VMprivate.h" /* Vector and array functions */ #include "H5WBprivate.h" /* Wrapped Buffers */ diff --git a/src/H5Dio.c b/src/H5Dio.c index 2652f6de6c3..14f8b7f85b9 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -24,12 +24,9 @@ #include "H5Dpkg.h" /* Dataset functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free Lists */ -#include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Sprivate.h" /* Dataspace */ -#include "H5VLnative_private.h" /* Native VOL connector */ - /****************/ /* Local Macros */ /****************/ diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index de8a27a1d89..7d8ba21f403 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -30,7 +30,6 @@ #include "H5Fprivate.h" /* File access */ #include "H5FDprivate.h" /* File drivers */ #include "H5FLprivate.h" /* Free Lists */ -#include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Oprivate.h" /* Object headers */ #include "H5Pprivate.h" /* Property lists */ diff --git a/src/H5Dnone.c b/src/H5Dnone.c index d4eb9188840..b319bd26fc6 100644 --- a/src/H5Dnone.c +++ b/src/H5Dnone.c @@ -34,7 +34,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Dpkg.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ -#include "H5FLprivate.h" /* Free Lists */ #include "H5MFprivate.h" /* File space management */ #include "H5VMprivate.h" /* Vector functions */ diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c index 4fc32ddf5c4..997c72c115e 100644 --- a/src/H5Dscatgath.c +++ b/src/H5Dscatgath.c @@ -24,7 +24,6 @@ #include "H5Dpkg.h" /* Dataset functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free Lists */ -#include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ /****************/ diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c index dd9f2353d7b..a08fa10d871 100644 --- a/src/H5Dsingle.c +++ b/src/H5Dsingle.c @@ -30,9 +30,7 @@ #include "H5private.h" /* Generic Functions */ #include "H5Dpkg.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ -#include "H5FLprivate.h" /* Free Lists */ #include "H5MFprivate.h" /* File space management */ -#include "H5VMprivate.h" /* Vector functions */ /****************/ /* Local Macros */ diff --git a/src/H5EAcache.c b/src/H5EAcache.c index 36494d3dec5..74a3abe2189 100644 --- a/src/H5EAcache.c +++ b/src/H5EAcache.c @@ -35,10 +35,7 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5EApkg.h" /* Extensible Arrays */ -#include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ -#include "H5VMprivate.h" /* Vectors and arrays */ -#include "H5WBprivate.h" /* Wrapped Buffers */ /****************/ /* Local Macros */ diff --git a/src/H5EAdblkpage.c b/src/H5EAdblkpage.c index c13b5196828..1fd04b2ee8c 100644 --- a/src/H5EAdblkpage.c +++ b/src/H5EAdblkpage.c @@ -36,7 +36,6 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5EApkg.h" /* Extensible Arrays */ #include "H5FLprivate.h" /* Free Lists */ -#include "H5VMprivate.h" /* Vectors and arrays */ /****************/ /* Local Macros */ diff --git a/src/H5EApkg.h b/src/H5EApkg.h index e8b5a13e8d4..3dd2a2da516 100644 --- a/src/H5EApkg.h +++ b/src/H5EApkg.h @@ -27,6 +27,7 @@ /* Other private headers needed by this file */ #include "H5FLprivate.h" /* Free Lists */ +#include "H5VMprivate.h" /* Vectors and arrays */ /**************************/ /* Package Private Macros */ diff --git a/src/H5ES.c b/src/H5ES.c index 24452f9a3d4..1c8b0876e11 100644 --- a/src/H5ES.c +++ b/src/H5ES.c @@ -35,7 +35,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5ESpkg.h" /* Event Sets */ -#include "H5FLprivate.h" /* Free Lists */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ diff --git a/src/H5ESlist.c b/src/H5ESlist.c index 1022e639f1b..90eef90fab6 100644 --- a/src/H5ESlist.c +++ b/src/H5ESlist.c @@ -32,10 +32,9 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5ESpkg.h" /* Event Sets */ -#include "H5FLprivate.h" /* Free Lists */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5ESpkg.h" /* Event Sets */ /****************/ /* Local Macros */ diff --git a/src/H5FAcache.c b/src/H5FAcache.c index 5aa06f6039a..2920dd1aaeb 100644 --- a/src/H5FAcache.c +++ b/src/H5FAcache.c @@ -35,10 +35,7 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5FApkg.h" /* Fixed Arrays */ -#include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ -#include "H5VMprivate.h" /* Vectors and arrays */ -#include "H5WBprivate.h" /* Wrapped Buffers */ /****************/ /* Local Macros */ diff --git a/src/H5FAdbg.c b/src/H5FAdbg.c index e28f67887b8..1e624b3e13c 100644 --- a/src/H5FAdbg.c +++ b/src/H5FAdbg.c @@ -35,7 +35,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5FApkg.h" /* Fixed Arrays */ -#include "H5Oprivate.h" /* Object Header */ #include "H5VMprivate.h" /* Vector functions */ /****************/ diff --git a/src/H5FD.c b/src/H5FD.c index f89fdd93b81..f8ad0275d34 100644 --- a/src/H5FD.c +++ b/src/H5FD.c @@ -30,7 +30,6 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5CXprivate.h" /* API Contexts */ -#include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* File access */ #include "H5FDpkg.h" /* File Drivers */ diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index 9173e5ba6c9..9899b2e1906 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -31,7 +31,6 @@ #include "H5FDdrvr_module.h" /* This source code file is part of the H5FD driver module */ #include "H5private.h" /* Generic Functions */ -#include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* File access */ #include "H5FDprivate.h" /* File drivers */ diff --git a/src/H5FDint.c b/src/H5FDint.c index 5d3a80212ef..a0b2c7d1ecb 100644 --- a/src/H5FDint.c +++ b/src/H5FDint.c @@ -376,7 +376,7 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs size_t size = 0; H5FD_mem_t type = H5FD_MEM_DEFAULT; hid_t dxpl_id = H5I_INVALID_HID; /* DXPL for operation */ - hbool_t is_raw = FALSE; /* Does this include raw data */ + bool is_raw = false; /* Does this include raw data */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -461,7 +461,7 @@ H5FD_read_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addrs /* Check for raw data operation */ if (type == H5FD_MEM_DRAW) - is_raw = TRUE; + is_raw = true; } } @@ -618,7 +618,7 @@ H5FD_write_vector(H5FD_t *file, uint32_t count, H5FD_mem_t types[], haddr_t addr H5FD_mem_t type = H5FD_MEM_DEFAULT; hid_t dxpl_id; /* DXPL for operation */ haddr_t eoa = HADDR_UNDEF; /* EOA for file */ - hbool_t is_raw = FALSE; /* Does this include raw data */ + bool is_raw = false; /* Does this include raw data */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c index f247c3478f8..bfa21253af8 100644 --- a/src/H5FDmpi.c +++ b/src/H5FDmpi.c @@ -15,12 +15,9 @@ */ #include "H5private.h" /* Generic Functions */ -#include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* File access */ #include "H5FDprivate.h" /* File drivers */ #include "H5FDmpi.h" /* Common MPI file driver */ -#include "H5Pprivate.h" /* Property lists */ #ifdef H5_HAVE_PARALLEL diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 9c8ccdd8de4..2668b27cead 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -38,7 +38,7 @@ static hid_t H5FD_MPIO_g = 0; /* Whether to allow collective I/O operations */ /* (Can be changed by setting "HDF5_MPI_OPT_TYPES" environment variable to '0' or '1') */ -hbool_t H5FD_mpi_opt_types_g = true; +bool H5FD_mpi_opt_types_g = true; /* Whether the driver initialized MPI on its own */ static bool H5FD_mpi_self_initialized = false; diff --git a/src/H5FDperform.c b/src/H5FDperform.c index 62097f11aaa..f07abd44ec7 100644 --- a/src/H5FDperform.c +++ b/src/H5FDperform.c @@ -19,11 +19,10 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5CXprivate.h" /* API Contexts */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5FDpkg.h" /* File Drivers */ -#include "H5Iprivate.h" /* IDs */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5FDpkg.h" /* File Drivers */ +#include "H5Iprivate.h" /* IDs */ /*------------------------------------------------------------------------- * Function: H5FDperform_init diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index c4bfbff24c8..59f833e31b5 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -28,7 +28,6 @@ #include "H5FDsec2.h" /* Sec2 file driver */ #include "H5FLprivate.h" /* Free Lists */ #include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ #include "H5Pprivate.h" /* Property lists */ /* The driver identification number, initialized at runtime */ diff --git a/src/H5FDwindows.c b/src/H5FDwindows.c index e38a4d31b68..71078cdc95c 100644 --- a/src/H5FDwindows.c +++ b/src/H5FDwindows.c @@ -12,13 +12,9 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* File access */ #include "H5FDprivate.h" /* File drivers */ #include "H5FDwindows.h" /* Windows file driver */ #include "H5FDsec2.h" /* Windows file driver */ -#include "H5FLprivate.h" /* Free Lists */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ #include "H5Pprivate.h" /* Property lists */ #ifdef H5_HAVE_WINDOWS diff --git a/src/H5FScache.c b/src/H5FScache.c index f5e9361c1eb..94c414f1eac 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -36,7 +36,6 @@ #include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ #include "H5VMprivate.h" /* Vectors and arrays */ -#include "H5WBprivate.h" /* Wrapped Buffers */ /****************/ /* Local Macros */ diff --git a/src/H5Fdeprec.c b/src/H5Fdeprec.c index bc43ca334e7..40e5ec3063d 100644 --- a/src/H5Fdeprec.c +++ b/src/H5Fdeprec.c @@ -36,7 +36,6 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* File access */ #include "H5Iprivate.h" /* IDs */ -#include "H5SMprivate.h" /* Shared object header messages */ #include "H5VLnative_private.h" /* Native VOL connector */ diff --git a/src/H5Fint.c b/src/H5Fint.c index 7b5aeb4c64f..76515bcd8a1 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -29,7 +29,6 @@ #include "H5FDprivate.h" /* File drivers */ #include "H5Gprivate.h" /* Groups */ #include "H5Iprivate.h" /* IDs */ -#include "H5Lprivate.h" /* Links */ #include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ #include "H5Pprivate.h" /* Property lists */ diff --git a/src/H5Fio.c b/src/H5Fio.c index b2c58353732..b0c24010e86 100644 --- a/src/H5Fio.c +++ b/src/H5Fio.c @@ -32,7 +32,6 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* File access */ #include "H5FDprivate.h" /* File drivers */ -#include "H5Iprivate.h" /* IDs */ #include "H5PBprivate.h" /* Page Buffer */ /****************/ diff --git a/src/H5Fmount.c b/src/H5Fmount.c index 47345f2d036..6f497468e3e 100644 --- a/src/H5Fmount.c +++ b/src/H5Fmount.c @@ -14,15 +14,11 @@ /* Packages needed by this file... */ #include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Metadata cache */ -#include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* File access */ #include "H5Gprivate.h" /* Groups */ -#include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Pprivate.h" /* Property lists */ -#include "H5VLprivate.h" /* Virtual Object Layer */ /* PRIVATE PROTOTYPES */ static void H5F__mount_count_ids_recurse(H5F_t *f, unsigned *nopen_files, unsigned *nopen_objs); diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c index f570038ddc3..805029f3ca6 100644 --- a/src/H5Fmpi.c +++ b/src/H5Fmpi.c @@ -284,7 +284,7 @@ H5Fset_mpi_atomicity(hid_t file_id, hbool_t flag) *------------------------------------------------------------------------- */ herr_t -H5F__get_mpi_atomicity(const H5F_t *file, hbool_t *flag) +H5F__get_mpi_atomicity(const H5F_t *file, bool *flag) { herr_t ret_value = SUCCEED; diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index 36ba660ad30..2d27579b67e 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -21,7 +21,6 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5ACprivate.h" /* Metadata cache */ -#include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* File access */ #include "H5FDprivate.h" /* File drivers */ diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c index e62cc474dfe..7161b8b2fd3 100644 --- a/src/H5Fsuper_cache.c +++ b/src/H5Fsuper_cache.c @@ -35,9 +35,7 @@ #include "H5FDprivate.h" /* File drivers */ #include "H5FLprivate.h" /* Free Lists */ #include "H5Gpkg.h" /* Groups */ -#include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ -#include "H5Pprivate.h" /* Property lists */ /****************/ /* Local Macros */ diff --git a/src/H5Gcache.c b/src/H5Gcache.c index f7ba49ad933..8a908131482 100644 --- a/src/H5Gcache.c +++ b/src/H5Gcache.c @@ -31,9 +31,7 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Gpkg.h" /* Groups */ -#include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ -#include "H5WBprivate.h" /* Wrapped Buffers */ /****************/ /* Local Macros */ diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c index 5982c1205ef..19493ace078 100644 --- a/src/H5Gdeprec.c +++ b/src/H5Gdeprec.c @@ -32,7 +32,6 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Metadata cache */ #include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ #include "H5Gpkg.h" /* Groups */ diff --git a/src/H5Gent.c b/src/H5Gent.c index 0563ae15d4d..5b7c064ecfa 100644 --- a/src/H5Gent.c +++ b/src/H5Gent.c @@ -22,7 +22,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* File access */ -#include "H5FLprivate.h" /* Free Lists */ #include "H5Gpkg.h" /* Groups */ #include "H5HLprivate.h" /* Local Heaps */ #include "H5MMprivate.h" /* Memory management */ diff --git a/src/H5Glink.c b/src/H5Glink.c index fd4d5602798..b862947f195 100644 --- a/src/H5Glink.c +++ b/src/H5Glink.c @@ -35,7 +35,6 @@ #include "H5Iprivate.h" /* IDs */ #include "H5Lprivate.h" /* Links */ #include "H5MMprivate.h" /* Memory management */ -#include "H5Ppublic.h" /* Property Lists */ #include "H5VLnative_private.h" /* Native VOL connector */ diff --git a/src/H5Gname.c b/src/H5Gname.c index 1341a2cb8c2..38fea867511 100644 --- a/src/H5Gname.c +++ b/src/H5Gname.c @@ -32,7 +32,6 @@ #include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* File access */ -#include "H5FLprivate.h" /* Free Lists */ #include "H5Gpkg.h" /* Groups */ #include "H5Iprivate.h" /* IDs */ #include "H5Lprivate.h" /* Links */ diff --git a/src/H5Gobj.c b/src/H5Gobj.c index c5bdfc1be46..2b73c2b5cd9 100644 --- a/src/H5Gobj.c +++ b/src/H5Gobj.c @@ -28,14 +28,13 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* File access */ -#include "H5Gpkg.h" /* Groups */ -#include "H5Iprivate.h" /* IDs */ -#include "H5Lprivate.h" /* Links */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Pprivate.h" /* Property Lists */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fprivate.h" /* File access */ +#include "H5Gpkg.h" /* Groups */ +#include "H5Iprivate.h" /* IDs */ +#include "H5Lprivate.h" /* Links */ +#include "H5Pprivate.h" /* Property Lists */ /****************/ /* Local Macros */ diff --git a/src/H5Groot.c b/src/H5Groot.c index 0686fa97ab7..7d4a2521319 100644 --- a/src/H5Groot.c +++ b/src/H5Groot.c @@ -33,9 +33,7 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* File access */ #include "H5Gpkg.h" /* Groups */ -#include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ -#include "H5Pprivate.h" /* Property Lists */ /****************/ /* Local Macros */ diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c index dbb46c1de6f..67f8e479e15 100644 --- a/src/H5Gtraverse.c +++ b/src/H5Gtraverse.c @@ -30,7 +30,6 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5CXprivate.h" /* API Contexts */ -#include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* File access */ #include "H5Gpkg.h" /* Groups */ diff --git a/src/H5HF.c b/src/H5HF.c index 3484d45aa06..856d792c95a 100644 --- a/src/H5HF.c +++ b/src/H5HF.c @@ -35,9 +35,7 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ -#include "H5FOprivate.h" /* File objects */ #include "H5HFpkg.h" /* Fractal heaps */ -#include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ /****************/ diff --git a/src/H5HFcache.c b/src/H5HFcache.c index ad8e4d24227..b214a1ca1b4 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -34,8 +34,6 @@ #include "H5HFpkg.h" /* Fractal heaps */ #include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ -#include "H5VMprivate.h" /* Vectors and arrays */ -#include "H5WBprivate.h" /* Wrapped Buffers */ /****************/ /* Local Macros */ diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c index 14fab84a04b..d9a6c19bf19 100644 --- a/src/H5HFdbg.c +++ b/src/H5HFdbg.c @@ -31,7 +31,6 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ -#include "H5FLprivate.h" /* Free Lists */ #include "H5HFpkg.h" /* Fractal heaps */ #include "H5MMprivate.h" /* Memory management */ #include "H5VMprivate.h" /* Vectors and arrays */ diff --git a/src/H5HFman.c b/src/H5HFman.c index b15960aff62..edbb48e059f 100644 --- a/src/H5HFman.c +++ b/src/H5HFman.c @@ -31,9 +31,7 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5HFpkg.h" /* Fractal heaps */ -#include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ -#include "H5VMprivate.h" /* Vectors and arrays */ /****************/ /* Local Macros */ diff --git a/src/H5HFsection.c b/src/H5HFsection.c index 8b279994ca8..df30f8cdec9 100644 --- a/src/H5HFsection.c +++ b/src/H5HFsection.c @@ -27,7 +27,6 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5HFpkg.h" /* Fractal heaps */ #include "H5MMprivate.h" /* Memory management */ -#include "H5VMprivate.h" /* Vectors and arrays */ /****************/ /* Local Macros */ diff --git a/src/H5HGcache.c b/src/H5HGcache.c index 125d45141a4..6e42a7c624d 100644 --- a/src/H5HGcache.c +++ b/src/H5HGcache.c @@ -32,7 +32,6 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* File access */ #include "H5HGpkg.h" /* Global heaps */ -#include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ /****************/ diff --git a/src/H5HGdbg.c b/src/H5HGdbg.c index 0f100e49a09..8f33052421b 100644 --- a/src/H5HGdbg.c +++ b/src/H5HGdbg.c @@ -27,7 +27,6 @@ #include "H5ACprivate.h" /* Metadata cache */ #include "H5Eprivate.h" /* Error handling */ #include "H5HGpkg.h" /* Global heaps */ -#include "H5Iprivate.h" /* ID Functions */ /****************/ /* Local Macros */ diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c index 56c3117f081..89484ea1134 100644 --- a/src/H5Lexternal.c +++ b/src/H5Lexternal.c @@ -21,8 +21,6 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Metadata cache */ -#include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* Files */ #include "H5Gpkg.h" /* Groups */ diff --git a/src/H5MF.c b/src/H5MF.c index c8df9e475b0..2de3e7ad197 100644 --- a/src/H5MF.c +++ b/src/H5MF.c @@ -34,7 +34,6 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* File access */ #include "H5FSpkg.h" /* File free space */ -#include "H5Iprivate.h" /* IDs */ #include "H5MFpkg.h" /* File memory management */ #include "H5VMprivate.h" /* Vectors and arrays */ diff --git a/src/H5O.c b/src/H5O.c index aa43d891b8b..706a8ec4a36 100644 --- a/src/H5O.c +++ b/src/H5O.c @@ -32,7 +32,6 @@ #include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ #include "H5ESprivate.h" /* Event Sets */ -#include "H5Fprivate.h" /* File access */ #include "H5Iprivate.h" /* IDs */ #include "H5Lprivate.h" /* Links */ #include "H5Opkg.h" /* Object headers */ @@ -2150,14 +2149,14 @@ H5Oenable_mdc_flushes(hid_t object_id) /*------------------------------------------------------------------------- * Function: H5O__are_mdc_flushes_disabled * - * Purpose: Private version of cork status getter. + * Purpose: Private version of cork status getter * * Return: SUCCEED/FAIL * *------------------------------------------------------------------------- */ herr_t -H5O__are_mdc_flushes_disabled(const H5O_loc_t *oloc, hbool_t *are_disabled) +H5O__are_mdc_flushes_disabled(const H5O_loc_t *oloc, bool *are_disabled) { herr_t ret_value = SUCCEED; diff --git a/src/H5Ocache.c b/src/H5Ocache.c index 31763f91f04..53a7d0a7cfe 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -31,10 +31,8 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free lists */ -#include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ #include "H5Opkg.h" /* Object headers */ -#include "H5WBprivate.h" /* Wrapped Buffers */ /****************/ /* Local Macros */ diff --git a/src/H5Ocont.c b/src/H5Ocont.c index 6894eca2118..621095a1986 100644 --- a/src/H5Ocont.c +++ b/src/H5Ocont.c @@ -27,7 +27,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free Lists */ -#include "H5MFprivate.h" /* File memory management */ #include "H5Opkg.h" /* Object headers */ /* PRIVATE PROTOTYPES */ diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index e4b6dd5461d..e87a7701458 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -30,18 +30,15 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5Aprivate.h" /* Attributes */ -#include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free lists */ #include "H5Iprivate.h" /* IDs */ -#include "H5HGprivate.h" /* Global Heaps */ #include "H5FOprivate.h" /* File objects */ #include "H5Lprivate.h" /* Links */ #include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ #include "H5Opkg.h" /* Object headers */ #include "H5Pprivate.h" /* Property lists */ -#include "H5VLprivate.h" /* Virtual Object Layer */ /****************/ /* Local Macros */ diff --git a/src/H5Odbg.c b/src/H5Odbg.c index bc880bbe62f..dfc8e878d8f 100644 --- a/src/H5Odbg.c +++ b/src/H5Odbg.c @@ -32,7 +32,6 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5MMprivate.h" /* Memory management */ #include "H5Opkg.h" /* Object headers */ -#include "H5Ppublic.h" /* Property Lists */ /****************/ /* Local Macros */ diff --git a/src/H5Odtype.c b/src/H5Odtype.c index 620d6864b9d..05652df0fe2 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -18,7 +18,6 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* Files */ #include "H5FLprivate.h" /* Free Lists */ -#include "H5Gprivate.h" /* Groups */ #include "H5MMprivate.h" /* Memory management */ #include "H5Opkg.h" /* Object headers */ #include "H5Tpkg.h" /* Datatypes */ diff --git a/src/H5Ofill.c b/src/H5Ofill.c index 9eaeb800886..c1bb70ff146 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -21,7 +21,6 @@ #include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free Lists */ -#include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Opkg.h" /* Object headers */ #include "H5Pprivate.h" /* Property lists */ diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 75456d6e853..fc0f59ee60d 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -21,10 +21,8 @@ #include "H5Dpkg.h" /* Dataset functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free Lists */ -#include "H5MFprivate.h" /* File space management */ #include "H5MMprivate.h" /* Memory management */ #include "H5Opkg.h" /* Object headers */ -#include "H5Pprivate.h" /* Property lists */ /* Local macros */ diff --git a/src/H5Olink.c b/src/H5Olink.c index 6657a500c16..431e1dd4965 100644 --- a/src/H5Olink.c +++ b/src/H5Olink.c @@ -19,14 +19,12 @@ *------------------------------------------------------------------------- */ -#define H5G_FRIEND /*suppress error about including H5Gpkg */ #define H5L_FRIEND /*suppress error about including H5Lpkg */ #include "H5Omodule.h" /* This source code file is part of the H5O module */ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free lists */ -#include "H5Gpkg.h" /* Groups */ #include "H5Iprivate.h" /* IDs */ #include "H5Lpkg.h" /* Links */ #include "H5MMprivate.h" /* Memory management */ diff --git a/src/H5Omessage.c b/src/H5Omessage.c index bc4381b2dd5..7190e46a57f 100644 --- a/src/H5Omessage.c +++ b/src/H5Omessage.c @@ -29,7 +29,6 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ -#include "H5Aprivate.h" /* Attributes */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* File access */ #include "H5Iprivate.h" /* IDs */ diff --git a/src/H5Omtime.c b/src/H5Omtime.c index 864af930b49..cd7fba4c05f 100644 --- a/src/H5Omtime.c +++ b/src/H5Omtime.c @@ -19,7 +19,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free lists */ -#include "H5MMprivate.h" /* Memory management */ #include "H5Opkg.h" /* Object headers */ static void *H5O__mtime_new_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags, diff --git a/src/H5Opline.c b/src/H5Opline.c index 897fa34dc40..80345d85abb 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -18,7 +18,6 @@ #define H5Z_FRIEND /*suppress error about including H5Zpkg */ #include "H5private.h" /* Generic Functions */ -#include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free Lists */ #include "H5MMprivate.h" /* Memory management */ diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c index cf68a761bed..1658fa719f9 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -17,8 +17,6 @@ #include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free lists */ -#include "H5Gprivate.h" /* Groups */ -#include "H5MMprivate.h" /* Memory management */ #include "H5Opkg.h" /* Object headers */ #include "H5Spkg.h" /* Dataspaces */ diff --git a/src/H5Oshared.c b/src/H5Oshared.c index f53fae5119f..9c32caf426b 100644 --- a/src/H5Oshared.c +++ b/src/H5Oshared.c @@ -32,7 +32,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* File access */ -#include "H5Gprivate.h" /* Groups */ #include "H5HFprivate.h" /* Fractal heap */ #include "H5MMprivate.h" /* Memory management */ #include "H5Opkg.h" /* Object headers */ diff --git a/src/H5Otest.c b/src/H5Otest.c index 2c23f0cbf18..410baa7f603 100644 --- a/src/H5Otest.c +++ b/src/H5Otest.c @@ -30,7 +30,6 @@ #include "H5ACprivate.h" /* Metadata cache */ #include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ #include "H5Opkg.h" /* Object headers */ /****************/ diff --git a/src/H5PB.c b/src/H5PB.c index c671489c74a..b941225c7db 100644 --- a/src/H5PB.c +++ b/src/H5PB.c @@ -33,7 +33,6 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* Files */ #include "H5FDprivate.h" /* File drivers */ -#include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5PBpkg.h" /* File access */ #include "H5SLprivate.h" /* Skip List */ diff --git a/src/H5PLint.c b/src/H5PLint.c index 23d07506d3e..6ee4603f63a 100644 --- a/src/H5PLint.c +++ b/src/H5PLint.c @@ -24,11 +24,10 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5PLpkg.h" /* Plugin */ -#include "H5Zprivate.h" /* Filter pipeline */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5PLpkg.h" /* Plugin */ +#include "H5Zprivate.h" /* Filter pipeline */ /****************/ /* Local Macros */ diff --git a/src/H5PLplugin_cache.c b/src/H5PLplugin_cache.c index 3538d7f5580..3878f36efaa 100644 --- a/src/H5PLplugin_cache.c +++ b/src/H5PLplugin_cache.c @@ -35,7 +35,6 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5MMprivate.h" /* Memory management */ #include "H5PLpkg.h" /* Plugin */ -#include "H5Zprivate.h" /* Filter pipeline */ /****************/ /* Local Macros */ diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index da516db1a7a..96cb52aa9e2 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -30,7 +30,6 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ -#include "H5CXprivate.h" /* API Contexts */ #include "H5Dpkg.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free Lists */ diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c index 344746f6b2f..a2538810d38 100644 --- a/src/H5Pdxpl.c +++ b/src/H5Pdxpl.c @@ -29,11 +29,9 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Cache */ #include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5FDprivate.h" /* File drivers */ -#include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Ppkg.h" /* Property lists */ #include "H5VMprivate.h" /* Vector Functions */ diff --git a/src/H5Pencdec.c b/src/H5Pencdec.c index 77568c5deca..4d1d8187591 100644 --- a/src/H5Pencdec.c +++ b/src/H5Pencdec.c @@ -25,7 +25,6 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* Files */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Ppkg.h" /* Property lists */ diff --git a/src/H5Pfmpl.c b/src/H5Pfmpl.c index ff6a3a3a1b2..97856c5a525 100644 --- a/src/H5Pfmpl.c +++ b/src/H5Pfmpl.c @@ -31,7 +31,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* Files */ -#include "H5Iprivate.h" /* IDs */ #include "H5Ppkg.h" /* Property lists */ /****************/ diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c index bcf9e8fc3d6..4ea0448356c 100644 --- a/src/H5Pgcpl.c +++ b/src/H5Pgcpl.c @@ -31,7 +31,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Gprivate.h" /* Groups */ -#include "H5Iprivate.h" /* IDs */ #include "H5Oprivate.h" /* Object headers */ #include "H5Ppkg.h" /* Property lists */ diff --git a/src/H5Pint.c b/src/H5Pint.c index f6dbb2706c1..544ad370249 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -23,12 +23,8 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#ifdef H5_HAVE_PARALLEL -#include "H5ACprivate.h" /* Metadata cache */ -#endif /* H5_HAVE_PARALLEL */ +#include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* File access */ #include "H5FLprivate.h" /* Free lists */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ diff --git a/src/H5Plcpl.c b/src/H5Plcpl.c index 65a740c977c..b720b105949 100644 --- a/src/H5Plcpl.c +++ b/src/H5Plcpl.c @@ -30,7 +30,6 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ #include "H5Lprivate.h" /* Links */ #include "H5Ppkg.h" /* Property lists */ diff --git a/src/H5Pmapl.c b/src/H5Pmapl.c index ffb33d94a13..8824f051f2c 100644 --- a/src/H5Pmapl.c +++ b/src/H5Pmapl.c @@ -29,7 +29,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Mprivate.h" /* Maps */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ #include "H5Ppkg.h" /* Property lists */ /****************/ diff --git a/src/H5Pmcpl.c b/src/H5Pmcpl.c index f2cc29a8bb1..367edb3f8b7 100644 --- a/src/H5Pmcpl.c +++ b/src/H5Pmcpl.c @@ -31,7 +31,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Mprivate.h" /* Maps */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ #include "H5Ppkg.h" /* Property lists */ /****************/ diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c index 721e141a38a..d293e84f08a 100644 --- a/src/H5Pocpl.c +++ b/src/H5Pocpl.c @@ -31,11 +31,9 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Opkg.h" /* Object headers */ #include "H5Ppkg.h" /* Property lists */ -#include "H5PLprivate.h" /* Dynamic plugin */ #include "H5VMprivate.h" /* Vector Functions */ #include "H5Zprivate.h" /* Filter pipeline */ diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c index 113caa95769..8a723378574 100644 --- a/src/H5Pocpypl.c +++ b/src/H5Pocpypl.c @@ -31,7 +31,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free Lists */ -#include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Oprivate.h" /* Object headers */ #include "H5Ppkg.h" /* Property lists */ diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c index b23a6fd6236..58cfa4c6645 100644 --- a/src/H5Pstrcpl.c +++ b/src/H5Pstrcpl.c @@ -31,7 +31,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* Files */ -#include "H5Iprivate.h" /* IDs */ #include "H5Ppkg.h" /* Property lists */ /****************/ diff --git a/src/H5Ptest.c b/src/H5Ptest.c index 5d2446c5d39..f52a3702100 100644 --- a/src/H5Ptest.c +++ b/src/H5Ptest.c @@ -22,7 +22,6 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5Iprivate.h" /* IDs */ #include "H5Ppkg.h" /* Property lists */ -#include "H5Dprivate.h" /* Dataset */ /* Local variables */ diff --git a/src/H5R.c b/src/H5R.c index 8c2d88ad7fd..3a91b926a17 100644 --- a/src/H5R.c +++ b/src/H5R.c @@ -28,7 +28,6 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5ESprivate.h" /* Event Sets */ #include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ #include "H5Rpkg.h" /* References */ #include "H5Sprivate.h" /* Dataspaces */ #include "H5VLprivate.h" /* Virtual Object Layer */ diff --git a/src/H5Rdeprec.c b/src/H5Rdeprec.c index 0637eae3df0..90869cf3ab1 100644 --- a/src/H5Rdeprec.c +++ b/src/H5Rdeprec.c @@ -36,7 +36,6 @@ /* Private headers needed by this file */ #include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Metadata cache */ #include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ #include "H5Gprivate.h" /* Groups */ diff --git a/src/H5Rint.c b/src/H5Rint.c index 6a84f1cb726..4606a57d3f7 100644 --- a/src/H5Rint.c +++ b/src/H5Rint.c @@ -20,18 +20,14 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Metadata cache */ #include "H5CXprivate.h" /* API Contexts */ -#include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Gprivate.h" /* Groups */ #include "H5HGprivate.h" /* Global Heaps */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Oprivate.h" /* Object headers */ #include "H5Rpkg.h" /* References */ #include "H5Sprivate.h" /* Dataspaces */ -#include "H5Tprivate.h" /* Datatypes */ #include "H5VLnative_private.h" /* Native VOL connector */ diff --git a/src/H5SMbtree2.c b/src/H5SMbtree2.c index d021a482cb0..ef0da51544c 100644 --- a/src/H5SMbtree2.c +++ b/src/H5SMbtree2.c @@ -20,11 +20,10 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Opkg.h" /* Object Headers */ -#include "H5SMpkg.h" /* Shared object header messages */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Opkg.h" /* Object Headers */ +#include "H5SMpkg.h" /* Shared object header messages */ /****************/ /* Local Macros */ diff --git a/src/H5SMcache.c b/src/H5SMcache.c index 029e402bad3..77f1eef222e 100644 --- a/src/H5SMcache.c +++ b/src/H5SMcache.c @@ -31,10 +31,8 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* File access */ #include "H5FLprivate.h" /* Free Lists */ -#include "H5MFprivate.h" /* File memory management */ #include "H5MMprivate.h" /* Memory management */ #include "H5SMpkg.h" /* Shared object header messages */ -#include "H5WBprivate.h" /* Wrapped Buffers */ /****************/ /* Local Macros */ diff --git a/src/H5SMpkg.h b/src/H5SMpkg.h index 64f5c76937f..439954a1db3 100644 --- a/src/H5SMpkg.h +++ b/src/H5SMpkg.h @@ -29,6 +29,7 @@ #include "H5ACprivate.h" /* Metadata Cache */ #include "H5B2private.h" /* B-trees */ #include "H5HFprivate.h" /* Fractal heaps */ +#include "H5FLprivate.h" /* Free Lists */ /****************************/ /* Package Macros */ diff --git a/src/H5SMtest.c b/src/H5SMtest.c index f306b892079..bde1d1d5e9c 100644 --- a/src/H5SMtest.c +++ b/src/H5SMtest.c @@ -24,7 +24,6 @@ #include "H5ACprivate.h" /* Metadata cache */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* File access */ -#include "H5FLprivate.h" /* Free Lists */ #include "H5SMpkg.h" /* Shared object header messages */ /****************/ diff --git a/src/H5Snone.c b/src/H5Snone.c index c4fdd4c670d..9e1ac8a8bef 100644 --- a/src/H5Snone.c +++ b/src/H5Snone.c @@ -23,11 +23,10 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* ID Functions */ -#include "H5Spkg.h" /* Dataspace functions */ -#include "H5VMprivate.h" /* Vector functions */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Iprivate.h" /* ID Functions */ +#include "H5Spkg.h" /* Dataspace functions */ /****************/ /* Local Macros */ diff --git a/src/H5Tbit.c b/src/H5Tbit.c index f70b038a9e6..c8300b85cde 100644 --- a/src/H5Tbit.c +++ b/src/H5Tbit.c @@ -19,7 +19,6 @@ #include "H5private.h" /*generic functions */ #include "H5Eprivate.h" /*error handling */ -#include "H5MMprivate.h" /* Memory management */ #include "H5Tpkg.h" /*data-type functions */ #include "H5WBprivate.h" /* Wrapped Buffers */ diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c index 70b0930fa90..5c4b4be9553 100644 --- a/src/H5Tcommit.c +++ b/src/H5Tcommit.c @@ -25,7 +25,6 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Metadata cache */ #include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ #include "H5ESprivate.h" /* Event Sets */ diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c index f877d5263ae..17ccc50ac7e 100644 --- a/src/H5Tcompound.c +++ b/src/H5Tcompound.c @@ -25,7 +25,6 @@ /* Headers */ /***********/ #include "H5private.h" /*generic functions */ -#include "H5CXprivate.h" /*API Contexts */ #include "H5Eprivate.h" /*error handling */ #include "H5Iprivate.h" /*ID functions */ #include "H5MMprivate.h" /*memory management */ diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 607b5efe37b..a37800bfed3 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -30,7 +30,6 @@ #include "H5FLprivate.h" /* Free Lists */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ -#include "H5Pprivate.h" /* Property lists */ #include "H5Tpkg.h" /* Datatypes */ /****************/ @@ -3149,6 +3148,67 @@ H5T__conv_enum_numeric(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_enum_numeric() */ +/*------------------------------------------------------------------------- + * Function: H5T__conv_vlen_nested_free + * + * Purpose: Recursively locates and frees any nested VLEN components of + * complex data types (including COMPOUND). + * + * Return: Non-negative on success/Negative on failure. + * + *------------------------------------------------------------------------- + */ +static herr_t +H5T__conv_vlen_nested_free(uint8_t *buf, H5T_t *dt) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_PACKAGE + + switch (dt->shared->type) { + case H5T_VLEN: + /* Pointer buf refers to VLEN data; free it (always reset tmp) */ + if ((*(dt->shared->u.vlen.cls->del))(dt->shared->u.vlen.file, buf) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "can't free nested vlen"); + break; + + case H5T_COMPOUND: + /* Pointer buf refers to COMPOUND data; recurse for each member. */ + for (unsigned i = 0; i < dt->shared->u.compnd.nmembs; ++i) + if (H5T__conv_vlen_nested_free(buf + dt->shared->u.compnd.memb[i].offset, + dt->shared->u.compnd.memb[i].type) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "can't free compound member"); + break; + + case H5T_ARRAY: + /* Pointer buf refers to ARRAY data; recurse for each element. */ + for (unsigned i = 0; i < dt->shared->u.array.nelem; ++i) + if (H5T__conv_vlen_nested_free(buf + i * dt->shared->parent->shared->size, + dt->shared->parent) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "can't free array data"); + break; + + case H5T_INTEGER: + case H5T_FLOAT: + case H5T_TIME: + case H5T_STRING: + case H5T_BITFIELD: + case H5T_OPAQUE: + case H5T_REFERENCE: + case H5T_ENUM: + /* These types cannot contain vl data */ + break; + + case H5T_NO_CLASS: + case H5T_NCLASSES: + default: + HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "invalid datatype class"); + } + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5T__conv_vlen_nested_free() */ + /*------------------------------------------------------------------------- * Function: H5T__conv_vlen * @@ -3507,8 +3567,8 @@ H5T__conv_vlen(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t tmp = (uint8_t *)tmp_buf + seq_len * dst_base_size; for (u = seq_len; u < bg_seq_len; u++, tmp += dst_base_size) { - /* Delete sequence in destination location */ - if ((*(dst->shared->u.vlen.cls->del))(dst->shared->u.vlen.file, tmp) < 0) + /* Recursively free destination data */ + if (H5T__conv_vlen_nested_free(tmp, dst->shared->parent) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREMOVE, FAIL, "unable to remove heap object"); } /* end for */ diff --git a/src/H5Tdeprec.c b/src/H5Tdeprec.c index 34e3687918e..76cddc7292b 100644 --- a/src/H5Tdeprec.c +++ b/src/H5Tdeprec.c @@ -32,10 +32,8 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Metadata cache */ #include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ -#include "H5FOprivate.h" /* File objects */ #include "H5Iprivate.h" /* IDs */ #include "H5Ppublic.h" /* Property Lists */ #include "H5Tpkg.h" /* Datatypes */ diff --git a/src/H5Tnative.c b/src/H5Tnative.c index 0e7d395bbc4..bf039e6194b 100644 --- a/src/H5Tnative.c +++ b/src/H5Tnative.c @@ -18,10 +18,8 @@ #include "H5Tmodule.h" /* This source code file is part of the H5T module */ #include "H5private.h" /* Generic Functions */ -#include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ #include "H5Iprivate.h" /* IDs */ -#include "H5Pprivate.h" /* Property lists */ #include "H5MMprivate.h" /* Memory management */ #include "H5Tpkg.h" /* Datatypes */ diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c index ff822b2a592..6cf11c77234 100644 --- a/src/H5Tvlen.c +++ b/src/H5Tvlen.c @@ -20,7 +20,6 @@ /****************/ #include "H5Tmodule.h" /* This source code file is part of the H5T module */ -#define H5F_FRIEND /*suppress error about including H5Fpkg */ /***********/ /* Headers */ @@ -28,7 +27,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5CXprivate.h" /* API Contexts */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Fpkg.h" /* File */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Tpkg.h" /* Datatypes */ diff --git a/src/H5VL.c b/src/H5VL.c index 8e68f018e8b..ce28a24cff1 100644 --- a/src/H5VL.c +++ b/src/H5VL.c @@ -27,13 +27,12 @@ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5CXprivate.h" /* API Contexts */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5Tprivate.h" /* Datatypes */ -#include "H5VLpkg.h" /* Virtual Object Layer */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Iprivate.h" /* IDs */ +#include "H5Pprivate.h" /* Property lists */ +#include "H5Tprivate.h" /* Datatypes */ +#include "H5VLpkg.h" /* Virtual Object Layer */ /* VOL connectors */ #include "H5VLnative.h" /* Native VOL connector */ diff --git a/src/H5VLdyn_ops.c b/src/H5VLdyn_ops.c index 9d2e287e988..5f3f58c5fda 100644 --- a/src/H5VLdyn_ops.c +++ b/src/H5VLdyn_ops.c @@ -30,7 +30,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free lists */ -#include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5SLprivate.h" /* Skip lists */ #include "H5VLpkg.h" /* Virtual Object Layer */ diff --git a/src/H5VLnative_datatype.c b/src/H5VLnative_datatype.c index b2451d749b1..41776ebcba6 100644 --- a/src/H5VLnative_datatype.c +++ b/src/H5VLnative_datatype.c @@ -29,7 +29,6 @@ #include "H5Gprivate.h" /* Groups */ #include "H5Iprivate.h" /* IDs */ #include "H5Oprivate.h" /* Object headers */ -#include "H5Pprivate.h" /* Property lists */ #include "H5Tpkg.h" /* Datatypes */ #include "H5VLprivate.h" /* Virtual Object Layer */ diff --git a/src/H5VLnative_file.c b/src/H5VLnative_file.c index 9ebc2c28cfd..0c13c1d9f7c 100644 --- a/src/H5VLnative_file.c +++ b/src/H5VLnative_file.c @@ -29,7 +29,6 @@ #include "H5Cprivate.h" /* Cache */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* Files */ -#include "H5Gprivate.h" /* Groups */ #include "H5Iprivate.h" /* IDs */ #include "H5MFprivate.h" /* File memory management */ #include "H5Pprivate.h" /* Property lists */ diff --git a/src/H5VLnative_group.c b/src/H5VLnative_group.c index 70b7ab9d6cd..43ab7a3b63d 100644 --- a/src/H5VLnative_group.c +++ b/src/H5VLnative_group.c @@ -29,7 +29,6 @@ #include "H5Gpkg.h" /* Groups */ #include "H5Iprivate.h" /* IDs */ #include "H5Oprivate.h" /* Object headers */ -#include "H5Pprivate.h" /* Property lists */ #include "H5VLprivate.h" /* Virtual Object Layer */ #include "H5VLnative_private.h" /* Native VOL connector */ diff --git a/src/H5VLnative_link.c b/src/H5VLnative_link.c index 5f4fa4db6b2..c25a01271d2 100644 --- a/src/H5VLnative_link.c +++ b/src/H5VLnative_link.c @@ -27,9 +27,7 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Gprivate.h" /* Groups */ -#include "H5Iprivate.h" /* IDs */ #include "H5Lpkg.h" /* Links */ -#include "H5Pprivate.h" /* Property lists */ #include "H5VLprivate.h" /* Virtual Object Layer */ #include "H5VLnative_private.h" /* Native VOL connector */ diff --git a/src/H5VLnative_object.c b/src/H5VLnative_object.c index 8c21e7f8d03..00442b8316a 100644 --- a/src/H5VLnative_object.c +++ b/src/H5VLnative_object.c @@ -31,7 +31,6 @@ #include "H5Gprivate.h" /* Groups */ #include "H5Iprivate.h" /* IDs */ #include "H5Opkg.h" /* Object headers */ -#include "H5Pprivate.h" /* Property lists */ #include "H5VLprivate.h" /* Virtual Object Layer */ #include "H5VLnative_private.h" /* Native VOL connector */ diff --git a/src/H5Z.c b/src/H5Z.c index 6d02027e083..1895501f085 100644 --- a/src/H5Z.c +++ b/src/H5Z.c @@ -13,7 +13,6 @@ #include "H5Zmodule.h" /* This source code file is part of the H5Z module */ #include "H5private.h" /* Generic Functions */ -#include "H5CXprivate.h" /* API Contexts */ #include "H5Dprivate.h" /* Dataset functions */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* File */ diff --git a/src/H5Zfletcher32.c b/src/H5Zfletcher32.c index 37f13819ab9..a90131c6f80 100644 --- a/src/H5Zfletcher32.c +++ b/src/H5Zfletcher32.c @@ -14,7 +14,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* File access */ #include "H5MMprivate.h" /* Memory management */ #include "H5Zpkg.h" /* Data filters */ diff --git a/src/H5Znbit.c b/src/H5Znbit.c index 65d09c78fef..fb5c5c51f8d 100644 --- a/src/H5Znbit.c +++ b/src/H5Znbit.c @@ -17,7 +17,6 @@ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Ppublic.h" /* Property lists */ -#include "H5Oprivate.h" /* Object headers */ #include "H5Sprivate.h" /* Dataspaces */ #include "H5Tprivate.h" /* Datatypes */ #include "H5Zpkg.h" /* Data filters */ diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c index 685e25a9c73..fba1c7d6c2e 100644 --- a/src/H5Zscaleoffset.c +++ b/src/H5Zscaleoffset.c @@ -13,7 +13,6 @@ #include "H5Zmodule.h" /* This source code file is part of the H5Z module */ #include "H5private.h" /* Generic Functions */ -#include "H5ACprivate.h" /* Metadata cache */ #include "H5Eprivate.h" /* Error handling */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ diff --git a/src/H5Zszip.c b/src/H5Zszip.c index 052efa8c118..f75060e38e6 100644 --- a/src/H5Zszip.c +++ b/src/H5Zszip.c @@ -14,7 +14,6 @@ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ -#include "H5Fprivate.h" /* File access */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Oprivate.h" /* Object headers */ diff --git a/test/dsets.c b/test/dsets.c index 5fa74f9f4c6..3203ed0b887 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -15716,6 +15716,174 @@ test_0sized_dset_metadata_alloc(hid_t fapl_id) return FAIL; } /* end test_0sized_dset_metadata_alloc() */ +/*------------------------------------------------------------------------- + * Function: test_downsize_vlen_scalar_dataset + * + * Purpose: Tests H5Dwrite on a scalar dataset containing a VLEN array + * of { double, C-string }. This causes special code to free + * the nested VLEN (in this case, C-string) allocations. + * + * Return: Success: 0 + * Failure: -1 + * + *------------------------------------------------------------------------- + */ +#define VLEN_DS_NAME "test_downsize_vlen_scalar_dataset" +#define VLEN_DS_DIM 100 +#define VLEN_DS_STRLEN 20 +#define VLEN_DS_STRING "vlen test string" +#define VLEN_DS_VALUE 0.12345678901234567890 +#define VLEN_DS_ARRAY_DIM1 3 +#define VLEN_DS_ARRAY_DIM2 5 + +typedef struct { + double value; + char *string[VLEN_DS_ARRAY_DIM1][VLEN_DS_ARRAY_DIM2]; +} vlen_ds_compound_file_t; + +typedef struct { + int padding1; + double value; + int padding2; + char *string[VLEN_DS_ARRAY_DIM1][VLEN_DS_ARRAY_DIM2]; + int padding3; +} vlen_ds_compound_memory_t; + +static herr_t +test_downsize_vlen_scalar_dataset(hid_t file) +{ + hid_t scalar_sid = -1; /* Scalar dataspace ID */ + hid_t string_tid = -1; /* VARIABLE string datatype ID */ + hid_t string_array_tid = -1; /* VARIABLE string array datatype ID */ + hid_t compound_file_tid = -1; /* COMPOUND datatype ID */ + hid_t compound_memory_tid = -1; /* COMPOUND datatype ID */ + hid_t vlen_compound_file_tid = -1; /* VARIABLE COMPOUND datatype ID */ + hid_t vlen_compound_memory_tid = -1; /* VARIABLE COMPOUND datatype ID */ + hid_t scalar_did = -1; /* SCALAR dataset ID */ + hvl_t vlen_compound_data; /* Top-level VLEN data */ + vlen_ds_compound_memory_t *compound_data = NULL; /* Contents of VLEN data */ + char common_string[VLEN_DS_STRLEN]; /* Common string contents */ + hsize_t array_dims[2] = {VLEN_DS_ARRAY_DIM1, VLEN_DS_ARRAY_DIM2}; + int i, dim1, dim2; /* Local index variables */ + + TESTING("H5Dwrite() on down-sized VLEN contents"); + + /* Allocate space for compound data */ + if (NULL == (compound_data = + (vlen_ds_compound_memory_t *)malloc(VLEN_DS_DIM * sizeof(vlen_ds_compound_memory_t)))) + TEST_ERROR; + + /* Create scalar dataspace */ + if ((scalar_sid = H5Screate(H5S_SCALAR)) < 0) + TEST_ERROR; + + /* Create datatype VLEN{COMPOUND{"value":H5T_NATIVE_DOUBLE, "string":H5T_C_S1|H5T_VARIABLE}} */ + /* Note: the memory and file structures must be different to invoke the bug @ H5Tconv.c:3323 */ + if ((string_tid = H5Tcopy(H5T_C_S1)) < 0) + TEST_ERROR; + if (H5Tset_size(string_tid, H5T_VARIABLE) < 0) + TEST_ERROR; + + if ((string_array_tid = H5Tarray_create2(string_tid, 2, array_dims)) < 0) + TEST_ERROR; + + if ((compound_file_tid = H5Tcreate(H5T_COMPOUND, sizeof(vlen_ds_compound_file_t))) < 0) + TEST_ERROR; + if (H5Tinsert(compound_file_tid, "value", HOFFSET(vlen_ds_compound_file_t, value), H5T_NATIVE_DOUBLE) < 0) + TEST_ERROR; + if (H5Tinsert(compound_file_tid, "string", HOFFSET(vlen_ds_compound_file_t, string), string_array_tid) < + 0) + TEST_ERROR; + if ((vlen_compound_file_tid = H5Tvlen_create(compound_file_tid)) < 0) + TEST_ERROR; + + if ((compound_memory_tid = H5Tcreate(H5T_COMPOUND, sizeof(vlen_ds_compound_memory_t))) < 0) + TEST_ERROR; + if (H5Tinsert(compound_memory_tid, "value", HOFFSET(vlen_ds_compound_memory_t, value), + H5T_NATIVE_DOUBLE) < 0) + TEST_ERROR; + if (H5Tinsert(compound_memory_tid, "string", HOFFSET(vlen_ds_compound_memory_t, string), + string_array_tid) < 0) + TEST_ERROR; + if ((vlen_compound_memory_tid = H5Tvlen_create(compound_memory_tid)) < 0) + TEST_ERROR; + + /* Create the scalar dataset of this data type */ + if ((scalar_did = H5Dcreate2(file, VLEN_DS_NAME, vlen_compound_file_tid, scalar_sid, H5P_DEFAULT, + H5P_DEFAULT, H5P_DEFAULT)) < 0) + TEST_ERROR; + + /* Setup the variable-length data. Note that if the double "value" field is set to 0.0, the bug will NOT + */ + /* occur because this is the data at offset zero of the element, and it then looks like a NULL VLEN data + */ + strcpy(common_string, VLEN_DS_STRING); + + for (i = 0; i < VLEN_DS_DIM; ++i) { + compound_data[i].value = VLEN_DS_VALUE; + for (dim1 = 0; dim1 < VLEN_DS_ARRAY_DIM1; ++dim1) { + for (dim2 = 0; dim2 < VLEN_DS_ARRAY_DIM2; ++dim2) { + compound_data[i].string[dim1][dim2] = common_string; + } + } + compound_data[i].padding1 = 0; + compound_data[i].padding2 = 0; + compound_data[i].padding3 = 0; + } + + /* Starting with the maximum size, progressively over-write the content of the dataset with smaller + * arrays. */ + /* Note: the bug in v1.8.14 is tripped on the second iteration, when 100 elements are over-written + * with 99. */ + for (i = VLEN_DS_DIM; i > 0; --i) { + vlen_compound_data.len = (size_t)i; + vlen_compound_data.p = compound_data; + if (H5Dwrite(scalar_did, vlen_compound_memory_tid, scalar_sid, scalar_sid, H5P_DEFAULT, + &vlen_compound_data) < 0) + TEST_ERROR; + } + + /* Close everything */ + if (H5Sclose(scalar_sid) < 0) + TEST_ERROR; + if (H5Tclose(string_tid) < 0) + TEST_ERROR; + if (H5Tclose(string_array_tid) < 0) + TEST_ERROR; + if (H5Tclose(compound_file_tid) < 0) + TEST_ERROR; + if (H5Tclose(vlen_compound_file_tid) < 0) + TEST_ERROR; + if (H5Tclose(compound_memory_tid) < 0) + TEST_ERROR; + if (H5Tclose(vlen_compound_memory_tid) < 0) + TEST_ERROR; + if (H5Dclose(scalar_did) < 0) + TEST_ERROR; + free(compound_data); + compound_data = NULL; + + PASSED(); + return 0; + +error: + H5E_BEGIN_TRY + { + H5Sclose(scalar_sid); + H5Tclose(string_tid); + H5Tclose(string_array_tid); + H5Tclose(compound_file_tid); + H5Tclose(vlen_compound_file_tid); + H5Tclose(compound_memory_tid); + H5Tclose(vlen_compound_memory_tid); + H5Dclose(scalar_did); + free(compound_data); + compound_data = NULL; + } + H5E_END_TRY; + return -1; +} /* end test_downsize_vlen_scalar_dataset() */ + /*------------------------------------------------------------------------- * Function: main * @@ -15958,6 +16126,8 @@ main(void) nerrors += (test_farray_hdr_fd(envval, my_fapl) < 0 ? 1 : 0); nerrors += (test_bt2_hdr_fd(envval, my_fapl) < 0 ? 1 : 0); + nerrors += (test_downsize_vlen_scalar_dataset(file) < 0 ? 1 : 0); + if (H5Fclose(file) < 0) goto error; } /* end for new_format */ diff --git a/test/links.c b/test/links.c index 299a7c2d758..87efae8107b 100644 --- a/test/links.c +++ b/test/links.c @@ -633,8 +633,6 @@ cklinks(hid_t fapl, bool new_format) if ((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) FAIL_STACK_ERROR; - //! [H5Otoken_cmp_snip] - /* Hard link */ if (H5Oget_info_by_name3(file, "d1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR; @@ -656,6 +654,9 @@ cklinks(hid_t fapl, bool new_format) puts(" expected file location."); TEST_ERROR; } /* end if */ + + //! [H5Otoken_cmp_snip] + if (H5Lexists(file, "/", H5P_DEFAULT) != true) FAIL_STACK_ERROR; if (H5Lexists(file, "d1", H5P_DEFAULT) != true)