diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2020-08-01 16:18:18 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2020-08-01 16:18:18 (GMT) |
commit | 1ae6daaa807f2bfd63076215950d9c412bfa08d7 (patch) | |
tree | d60f5aa4158d275f953561b47089add1ea76ecd2 /hl/src/H5LT.c | |
parent | 0a64f3e8106a1ced78ae7c4a6744b3509d7ca0fc (diff) | |
download | hdf5-1ae6daaa807f2bfd63076215950d9c412bfa08d7.zip hdf5-1ae6daaa807f2bfd63076215950d9c412bfa08d7.tar.gz hdf5-1ae6daaa807f2bfd63076215950d9c412bfa08d7.tar.bz2 |
Sync with develop
Diffstat (limited to 'hl/src/H5LT.c')
-rw-r--r-- | hl/src/H5LT.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index d63776d..a631533 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -1407,12 +1407,18 @@ find_dataset(hid_t loc_id, const char *name, const H5L_info2_t *linfo, void *op_ * *------------------------------------------------------------------------- */ - +/* H5Literate wants a non-const pointer but we have a const pointer in the API + * call. It's safe to ignore this because we control the callback, don't + * modify the op_data buffer (i.e.: dset_name) during the traversal, and the + * library never modifies that buffer. + */ +H5_GCC_DIAG_OFF(cast-qual) herr_t H5LTfind_dataset( hid_t loc_id, const char *dset_name ) { return H5Literate2(loc_id, H5_INDEX_NAME, H5_ITER_INC, 0, find_dataset, (void *)dset_name); } +H5_GCC_DIAG_ON(cast-qual) /*------------------------------------------------------------------------- * @@ -2032,12 +2038,18 @@ herr_t H5LTfind_attribute( hid_t loc_id, const char* attr_name ) * *------------------------------------------------------------------------- */ - +/* H5Aiterate wants a non-const pointer but we have a const pointer in the API + * call. It's safe to ignore this because we control the callback, don't + * modify the op_data buffer (i.e.: attr_name) during the traversal, and the + * library never modifies that buffer. + */ +H5_GCC_DIAG_OFF(cast-qual) herr_t H5LT_find_attribute( hid_t loc_id, const char* attr_name ) { return H5Aiterate2(loc_id, H5_INDEX_NAME, H5_ITER_INC, NULL, find_attr, (void *)attr_name); } +H5_GCC_DIAG_ON(cast-qual) /*------------------------------------------------------------------------- |