diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2022-05-03 17:02:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 17:02:01 (GMT) |
commit | 5f00066eacdf2b2ddb3cf92635bea99eb1aee85e (patch) | |
tree | d7dc19a5e765e1f03933f3244ac622e362e33c2f /hl/src | |
parent | 47e3d5e79522d8030a5a455521524a80cd9ef064 (diff) | |
download | hdf5-5f00066eacdf2b2ddb3cf92635bea99eb1aee85e.zip hdf5-5f00066eacdf2b2ddb3cf92635bea99eb1aee85e.tar.gz hdf5-5f00066eacdf2b2ddb3cf92635bea99eb1aee85e.tar.bz2 |
Hdf5 1 12 Miscellaneous warnings fixes (#1718)
* Fixes const issues in the version 2 B-trees (#1172)
The operations that were changed are fundamentally not const since the
shadow operation can modify the node structure when SWMR is in use.
* Quiets const warning in H5RS code (#1181)
* Avoid calling H5Ropen_object with a misaligned H5R_ref_t: copy the (#1171)
* Avoid calling H5Ropen_object with a misaligned H5R_ref_t: copy the
raw H5R_ref_t bytes to a heap buffer that's known to have the right
alignment.
* Committing clang-format changes
* Use an automatic H5R_ref_t instead of malloc'ing one. Go ahead and
initialize the H5R_ref_t to all-0s so that arbitrary stack content
doesn't foul things up. Bail out with an error if `size` exceeds
`sizeof(H5R_ref_t)`.
* Committing clang-format changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Miscellaneous warnings fixes
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: David Young <dyoung@hdfgroup.org>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'hl/src')
-rw-r--r-- | hl/src/H5PT.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c index f5fb99f..2464dd1 100644 --- a/hl/src/H5PT.c +++ b/hl/src/H5PT.c @@ -29,7 +29,7 @@ static H5I_type_t H5PT_ptable_id_type = H5I_UNINIT; #define H5PT_HASH_TABLE_SIZE 64 /* Packet Table private functions */ -static herr_t H5PT_free_id(void *id, void **_ctx); +static herr_t H5PT_free_id(void *id); static herr_t H5PT_close(htbl_t *table); static herr_t H5PT_create_index(htbl_t *table_id); static herr_t H5PT_set_index(htbl_t *table_id, hsize_t pt_index); @@ -87,8 +87,7 @@ H5PTcreate(hid_t loc_id, const char *dset_name, hid_t dtype_id, hsize_t chunk_si /* Register the packet table ID type if this is the first table created */ if (H5PT_ptable_id_type < 0) - if ((H5PT_ptable_id_type = - H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0) + if ((H5PT_ptable_id_type = H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, H5PT_free_id)) < 0) goto error; /* Get memory for the table identifier */ @@ -208,8 +207,7 @@ H5PTcreate_fl(hid_t loc_id, const char *dset_name, hid_t dtype_id, hsize_t chunk /* Register the packet table ID type if this is the first table created */ if (H5PT_ptable_id_type < 0) - if ((H5PT_ptable_id_type = - H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0) + if ((H5PT_ptable_id_type = H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, H5PT_free_id)) < 0) goto error; /* Get memory for the table identifier */ @@ -323,8 +321,7 @@ H5PTopen(hid_t loc_id, const char *dset_name) /* Register the packet table ID type if this is the first table created */ if (H5PT_ptable_id_type < 0) - if ((H5PT_ptable_id_type = - H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, (H5I_free_t)H5PT_free_id)) < 0) + if ((H5PT_ptable_id_type = H5Iregister_type((size_t)H5PT_HASH_TABLE_SIZE, 0, H5PT_free_id)) < 0) goto error; table = (htbl_t *)HDmalloc(sizeof(htbl_t)); @@ -402,7 +399,7 @@ error: *------------------------------------------------------------------------- */ static herr_t -H5PT_free_id(void *id, void H5_ATTR_UNUSED **_ctx) +H5PT_free_id(void *id) { HDfree(id); return SUCCEED; |