diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2024-01-08 13:52:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-08 13:52:11 (GMT) |
commit | c0d6d9bb220bf995a268367cca88dc4febbacf99 (patch) | |
tree | 53847b4d8549e3233d58f6ecc6393787af15b098 /src/H5Iint.c | |
parent | 77de8fda28aab930294a081dedfdc2a0c6617d2f (diff) | |
download | hdf5-c0d6d9bb220bf995a268367cca88dc4febbacf99.zip hdf5-c0d6d9bb220bf995a268367cca88dc4febbacf99.tar.gz hdf5-c0d6d9bb220bf995a268367cca88dc4febbacf99.tar.bz2 |
Sync 1.14 branch with develop (#3923)
* Fix build error on freebsd (#3883)
Fixes:
checking for config freebsd12.1... no
checking for config freebsd... found
compiler '/home/svcpetsc/petsc-hash-pkgs/39f577/bin/mpicc' is GNU gcc-9.2.0
compiler '/home/svcpetsc/petsc-hash-pkgs/39f577/bin/mpif90' is GNU gfortran-9.2.0
stdout: .: cannot open ./config/classic-fflags: No such file or directory
* Correct CMake command and example packaging (#3888)
* Feat: Hashpin sensitive dependencies on GitHub Actions and enable Dependabot to update them monthly (#3892)
* feat: hashpin sensitive dependencies on GHAs
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
* feat: enable dependabot for monthly updates on GHA
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
---------
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
* Some changes to portal links when they could be found on docs.hdfgroup.org, and changed the helpdesk link to help.hdfgroup.org (#3893)
* Updated some portal links to go directly to docs.hdfgroup.
* Fixed some portal and help desk links
* Add variable option syncing for examples (#3885)
* Add period(.) at the end of the sentence for consistency. (#3897)
* Remove redundant backslash character from comment. (#3899)
* Disable doxygen as errors for netcdf (#3900)
* disable building doxygen for netcdf test
* Doc versions (#3903)
* Added missing \since tags to H5D.
* Committing clang-format changes
* Fixed H5T version info.
* Committing clang-format changes
* Added missing version info to H5E.
* Committing clang-format changes
* Added version info to H5F public APIs.
* Committing clang-format changes
* Added missing H5Z public API version info.
* Added missing version info to H5G public APIs
* Added missing version info to H5I public API.
* Added missing version info to H5 public APIs
* Committing clang-format changes
* Added missing version info to H5P public APIs
* Added missing version info to H5R public APIs
* Fix comment error.
* Committing clang-format changes
---------
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Change Trouble Shooting to Troubleshooting (#3905)
* Implement optimized support for vector I/O in Subfiling VFD (#3896)
Vector I/O requests are now processed within a single
set of I/O call batches, rather than each I/O vector
entry (tuple constructed from the types, addrs, sizes
and bufs arrays) being processed individually. This allows I/O to be
more efficiently parallelized among the I/O concentrator processes
during large I/O requests.
* Fixed some calculations and add test cases for issues spotted from review
* Removed a variable that was compensating for previous miscalculations
* Add 'warning density' computation to the warnhist script (#3910)
* Add 'warning density' computation to the warnhist script, along with several
cleanups to it. Add "--enable-show-all-warnings" configure (and CMake)
option to disable compiler diagnostic suppression (and therefore show all the
otherwise suppressed compiler diagnostics), disabled by default. Clean up
a buncn of misc. warnings.
Signed-off-by: Quincey Koziol <qkoziol@amazon.com>
* Added H5Fdelete_f with test (#3912)
* New Fortran Examples added (#3916)
* added subfiling example
* Added filtered writes with no selection example
* Version and space corrections.
* Restore H5_VERSION definition in configure.ac.
* renamed defined H5_VERS* to avoid conflicts (#3926)
Diffstat (limited to 'src/H5Iint.c')
-rw-r--r-- | src/H5Iint.c | 58 |
1 files changed, 19 insertions, 39 deletions
diff --git a/src/H5Iint.c b/src/H5Iint.c index 7d8b4ac..1c53214 100644 --- a/src/H5Iint.c +++ b/src/H5Iint.c @@ -369,17 +369,16 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata) */ if (udata->force || (info->count - (!udata->app_ref * info->app_count)) <= 1) { /* Check if this is an un-realized future object */ - H5_GCC_CLANG_DIAG_OFF("cast-qual") if (info->is_future) { /* Discard the future object */ - if ((info->discard_cb)((void *)info->object) < 0) { + if ((info->discard_cb)(info->u.object) < 0) { if (udata->force) { #ifdef H5I_DEBUG if (H5DEBUG(I)) { fprintf(H5DEBUG(I), "H5I: discard type=%d obj=%p " "failure ignored\n", - (int)udata->type_info->cls->type, info->object); + (int)udata->type_info->cls->type, info->u.c_object); } #endif /* H5I_DEBUG */ @@ -395,14 +394,14 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata) else { /* Check for a 'free' function and call it, if it exists */ if (udata->type_info->cls->free_func && - (udata->type_info->cls->free_func)((void *)info->object, H5_REQUEST_NULL) < 0) { + (udata->type_info->cls->free_func)(info->u.object, H5_REQUEST_NULL) < 0) { if (udata->force) { #ifdef H5I_DEBUG if (H5DEBUG(I)) { fprintf(H5DEBUG(I), "H5I: free type=%d obj=%p " "failure ignored\n", - (int)udata->type_info->cls->type, info->object); + (int)udata->type_info->cls->type, info->u.c_object); } #endif /* H5I_DEBUG */ @@ -415,7 +414,6 @@ H5I__mark_node(void *_info, void H5_ATTR_UNUSED *key, void *_udata) mark = true; } } - H5_GCC_CLANG_DIAG_ON("cast-qual") /* Remove ID if requested */ if (mark) { @@ -524,7 +522,7 @@ H5I__register(H5I_type_t type, const void *object, bool app_ref, H5I_future_real info->id = new_id; info->count = 1; /* initial reference count */ info->app_count = !!app_ref; - info->object = object; + info->u.c_object = object; info->is_future = (NULL != realize_cb); info->realize_cb = realize_cb; info->discard_cb = discard_cb; @@ -633,7 +631,7 @@ H5I_register_using_existing_id(H5I_type_t type, void *object, bool app_ref, hid_ info->id = existing_id; info->count = 1; /* initial reference count*/ info->app_count = !!app_ref; - info->object = object; + info->u.object = object; /* This API call is only used by the native VOL connector, which is * not asynchronous. */ @@ -677,12 +675,10 @@ H5I_subst(hid_t id, const void *new_object) HGOTO_ERROR(H5E_ID, H5E_NOTFOUND, NULL, "can't get ID ref count"); /* Get the old object pointer to return */ - H5_GCC_CLANG_DIAG_OFF("cast-qual") - ret_value = (void *)info->object; - H5_GCC_CLANG_DIAG_ON("cast-qual") + ret_value = info->u.object; /* Set the new object pointer for the ID */ - info->object = new_object; + info->u.c_object = new_object; done: FUNC_LEAVE_NOAPI(ret_value) @@ -709,12 +705,9 @@ H5I_object(hid_t id) FUNC_ENTER_NOAPI_NOERR /* General lookup of the ID */ - if (NULL != (info = H5I__find_id(id))) { + if (NULL != (info = H5I__find_id(id))) /* Get the object pointer to return */ - H5_GCC_CLANG_DIAG_OFF("cast-qual") - ret_value = (void *)info->object; - H5_GCC_CLANG_DIAG_ON("cast-qual") - } + ret_value = info->u.object; FUNC_LEAVE_NOAPI(ret_value) } /* end H5I_object() */ @@ -742,12 +735,9 @@ H5I_object_verify(hid_t id, H5I_type_t type) assert(type >= 1 && (int)type < H5I_next_type_g); /* Verify that the type of the ID is correct & lookup the ID */ - if (type == H5I_TYPE(id) && NULL != (info = H5I__find_id(id))) { + if (type == H5I_TYPE(id) && NULL != (info = H5I__find_id(id))) /* Get the object pointer to return */ - H5_GCC_CLANG_DIAG_OFF("cast-qual") - ret_value = (void *)info->object; - H5_GCC_CLANG_DIAG_ON("cast-qual") - } + ret_value = info->u.object; FUNC_LEAVE_NOAPI(ret_value) } /* H5I_object_verify() */ @@ -898,9 +888,7 @@ H5I__remove_common(H5I_type_info_t *type_info, hid_t id) if (type_info->last_id_info == info) type_info->last_id_info = NULL; - H5_GCC_CLANG_DIAG_OFF("cast-qual") - ret_value = (void *)info->object; - H5_GCC_CLANG_DIAG_ON("cast-qual") + ret_value = info->u.object; if (!H5I_marking_s) info = H5FL_FREE(H5I_id_info_t, info); @@ -1000,8 +988,7 @@ H5I__dec_ref(hid_t id, void **request) /* Get the ID's type */ type_info = H5I_type_info_array_g[H5I_TYPE(id)]; - H5_GCC_CLANG_DIAG_OFF("cast-qual") - if (!type_info->cls->free_func || (type_info->cls->free_func)((void *)info->object, request) >= 0) { + if (!type_info->cls->free_func || (type_info->cls->free_func)(info->u.object, request) >= 0) { /* Remove the node from the type */ if (NULL == H5I__remove_common(type_info, id)) HGOTO_ERROR(H5E_ID, H5E_CANTDELETE, (-1), "can't remove ID node"); @@ -1009,7 +996,6 @@ H5I__dec_ref(hid_t id, void **request) } /* end if */ else ret_value = -1; - H5_GCC_CLANG_DIAG_ON("cast-qual") } /* end if */ else { --(info->count); @@ -1482,9 +1468,7 @@ H5I__iterate_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata) /* The stored object pointer might be an H5VL_object_t, in which * case we'll need to get the wrapped object struct (H5F_t *, etc.). */ - H5_GCC_CLANG_DIAG_OFF("cast-qual") - object = H5I__unwrap((void *)info->object, type); - H5_GCC_CLANG_DIAG_ON("cast-qual") + object = H5I__unwrap(info->u.object, type); /* Invoke callback function */ cb_ret_val = (*udata->user_func)((void *)object, info->id, udata->user_udata); @@ -1607,14 +1591,13 @@ H5I__find_id(hid_t id) } /* Check if this is a future ID */ - H5_GCC_CLANG_DIAG_OFF("cast-qual") if (id_info && id_info->is_future) { hid_t actual_id = H5I_INVALID_HID; /* ID for actual object */ void *future_object; /* Pointer to the future object */ void *actual_object; /* Pointer to the actual object */ /* Invoke the realize callback, to get the actual object */ - if ((id_info->realize_cb)((void *)id_info->object, &actual_id) < 0) + if ((id_info->realize_cb)(id_info->u.object, &actual_id) < 0) HGOTO_DONE(NULL); /* Verify that we received a valid ID, of the same type */ @@ -1624,10 +1607,10 @@ H5I__find_id(hid_t id) HGOTO_DONE(NULL); /* Swap the actual object in for the future object */ - future_object = (void *)id_info->object; + future_object = id_info->u.object; actual_object = H5I__remove_common(type_info, actual_id); assert(actual_object); - id_info->object = actual_object; + id_info->u.object = actual_object; /* Discard the future object */ if ((id_info->discard_cb)(future_object) < 0) @@ -1639,7 +1622,6 @@ H5I__find_id(hid_t id) id_info->realize_cb = NULL; id_info->discard_cb = NULL; } - H5_GCC_CLANG_DIAG_ON("cast-qual") /* Set return value */ ret_value = id_info; @@ -1674,9 +1656,7 @@ H5I__find_id_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata) assert(udata); /* Get a pointer to the VOL connector's data */ - H5_GCC_CLANG_DIAG_OFF("cast-qual") - object = H5I__unwrap((void *)info->object, type); - H5_GCC_CLANG_DIAG_ON("cast-qual") + object = H5I__unwrap(info->u.object, type); /* Check for a match */ if (object == udata->object) { |