summaryrefslogtreecommitdiffstats
path: root/hl/src/H5LT.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-01-30 02:09:29 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-01-30 02:09:29 (GMT)
commita67c238feef1487814b02132bfd7961f22d9d6eb (patch)
tree07d613f8cd85a72f49acada0922004227a5c12b9 /hl/src/H5LT.c
parent9475ee5d59e9ac916271a64c5372dfc28f709417 (diff)
downloadhdf5-a67c238feef1487814b02132bfd7961f22d9d6eb.zip
hdf5-a67c238feef1487814b02132bfd7961f22d9d6eb.tar.gz
hdf5-a67c238feef1487814b02132bfd7961f22d9d6eb.tar.bz2
Cleaned up remaining warnings in high-level library.
Diffstat (limited to 'hl/src/H5LT.c')
-rw-r--r--hl/src/H5LT.c18
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)
/*-------------------------------------------------------------------------