Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence compiler warnings #85

Merged
merged 1 commit into from
Mar 19, 2024
Merged

Conversation

mattjala
Copy link
Collaborator

@mattjala mattjala commented Oct 10, 2023

Mostly dealing with issues around the const qualifier. Some changes of note:

  • The data in field for RV_parse_callback now has the const qualifier, so most callbacks now have a const qualifier on their data in field as well.
  • Removed the use of a callback in RV_multi_perform, now just checks the transfer type and uses the read callback directly. Removed the empty write callback.
  • Because the get_link_val_callback needed to modify the size of the in buffer,the size of the in buffer was paired with the buffer itself in a new struct, get_link_val_out.
  • Renamed RV_parse_type -> RV_parse_object_class to distinguish it from RV_parse_datataype

@@ -1539,7 +1539,8 @@ H5_rest_url_encode_path(const char *_path)
if (!_path)
FUNC_GOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "path was NULL");

path = (char *)_path;
/* Silence compiler const warnings */
memcpy(&path, &_path, sizeof(char *));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works (if a bit awkward), although we could probably get away with just making path and cur_pos const while using a different var. than cur_pos when indexing into tmp_buffer.

@jhendersonHDF jhendersonHDF merged commit 93cb19f into HDFGroup:master Mar 19, 2024
6 checks passed
@mattjala mattjala deleted the warnings_fix branch March 21, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants