summaryrefslogtreecommitdiffstats
path: root/src/H5Ocopy_ref.c
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2021-02-22 17:37:12 (GMT)
committerGitHub <noreply@github.com>2021-02-22 17:37:12 (GMT)
commit5ed255a607d604b45e92b06548682ae9b716535d (patch)
tree3dcf8239efca99143e561743c2ae997ce9ceca09 /src/H5Ocopy_ref.c
parent99669024ff93df3ade5b8a1e6eee8bef6df57161 (diff)
downloadhdf5-5ed255a607d604b45e92b06548682ae9b716535d.zip
hdf5-5ed255a607d604b45e92b06548682ae9b716535d.tar.gz
hdf5-5ed255a607d604b45e92b06548682ae9b716535d.tar.bz2
Fixed all -Wincompatible-pointer-types-discards-qualifiers warnings (#341)
* Fixed various -Wincompatible-pointer-types-discards-qualifiers warnings by adding const * Fixed various -Wincompatible-pointer-types-discards-qualifiers warning by removing extraneous consts There were casts with const, but the function parameter doesn't actaully take const, so just modified the casts. In the other case, a local variable was const that should not have been, becuase its source wasn't const either. * Fixed a -Wincompatible-pointer-types-discards-qualifiers warning by strdup-ing a string Create a duplicate string instead of mutating a supposedly const one.
Diffstat (limited to 'src/H5Ocopy_ref.c')
-rw-r--r--src/H5Ocopy_ref.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5Ocopy_ref.c b/src/H5Ocopy_ref.c
index f2372c1..f1f8aaf 100644
--- a/src/H5Ocopy_ref.c
+++ b/src/H5Ocopy_ref.c
@@ -63,7 +63,7 @@ static herr_t H5O__copy_expand_ref_object1(H5O_loc_t *src_oloc, const void *buf_
static herr_t H5O__copy_expand_ref_region1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t *dst_oloc,
H5G_loc_t *dst_root_loc, void *buf_dst, size_t ref_count,
H5O_copy_t *cpy_info);
-static herr_t H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, H5T_t *dt_src,
+static herr_t H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, const H5T_t *dt_src,
const void *buf_src, size_t nbytes_src, H5O_loc_t *dst_oloc,
H5G_loc_t *dst_root_loc, void *buf_dst, size_t ref_count,
H5O_copy_t *cpy_info);
@@ -284,7 +284,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, H5T_t *dt_src, const void *buf_src,
+H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, const H5T_t *dt_src, const void *buf_src,
size_t nbytes_src, H5O_loc_t *dst_oloc, H5G_loc_t *dst_root_loc, void *buf_dst,
size_t ref_count, H5O_copy_t *cpy_info)
{
@@ -423,7 +423,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5O_copy_expand_ref(H5F_t *file_src, hid_t tid_src, H5T_t *dt_src, void *buf_src, size_t nbytes_src,
+H5O_copy_expand_ref(H5F_t *file_src, hid_t tid_src, const H5T_t *dt_src, void *buf_src, size_t nbytes_src,
H5F_t *file_dst, void *buf_dst, H5O_copy_t *cpy_info)
{
H5O_loc_t dst_oloc; /* Copied object object location */