diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2020-01-30 16:43:40 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2020-01-30 16:43:40 (GMT) |
commit | d1f2eff23148da5e39463bd351be51767755b1c1 (patch) | |
tree | a52f4d1051f339a18e7e52a74a1af02ddf1f8f37 /hl/src/H5LT.c | |
parent | 1255363e9be3280108a351d97237de13755d6368 (diff) | |
parent | a67c238feef1487814b02132bfd7961f22d9d6eb (diff) | |
download | hdf5-d1f2eff23148da5e39463bd351be51767755b1c1.zip hdf5-d1f2eff23148da5e39463bd351be51767755b1c1.tar.gz hdf5-d1f2eff23148da5e39463bd351be51767755b1c1.tar.bz2 |
Merge pull request #2328 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit 'a67c238feef1487814b02132bfd7961f22d9d6eb':
Cleaned up remaining warnings in high-level library.
Diffstat (limited to 'hl/src/H5LT.c')
-rw-r--r-- | hl/src/H5LT.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c index 3f6c538..1caa881 100644 --- a/hl/src/H5LT.c +++ b/hl/src/H5LT.c @@ -1407,13 +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) /*------------------------------------------------------------------------- * @@ -2033,13 +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) /*------------------------------------------------------------------------- |