summaryrefslogtreecommitdiffstats
path: root/src/H5Gtest.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/H5Gtest.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/H5Gtest.c')
-rw-r--r--src/H5Gtest.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index 5f45c8c..9f0dca2 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -553,10 +553,10 @@ done:
herr_t
H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsigned *obj_hidden)
{
- void * obj_ptr; /* Pointer to object for ID */
- H5G_name_t *obj_path; /* Pointer to group hier. path for obj */
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- herr_t ret_value = SUCCEED; /* Return value */
+ void * obj_ptr; /* Pointer to object for ID */
+ const H5G_name_t *obj_path; /* Pointer to group hier. path for obj */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE