Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Fix compilation failure due to -Werror flag #4777
base: master
Are you sure you want to change the base?
Fix compilation failure due to -Werror flag #4777
Changes from all commits
6a9d617
c734e78
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ksmurchison can you have a look at this one please, I'm not familiar with the XML library.
In particular, a few lines later we save
err->message
intxn->error.desc
. That might not be safe if we don't have lifetime ownership of theerr
object, which the constness might imply.Since we aren't getting this warning/error outselves, perhaps this is an API change in the XML library that we haven't stumbled upon yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding const seems correct as that is what the API specifies. Since we're getting the error from the XML parser context, and there is a xmlCtxtResetLastError() function, I assume its safe to reference the error until we free the parser context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an information, the Arch distribution uses libxml2 v2.12.3. I see the changes at libxml2 GitLab repository which related to this issue. This is what maintainer's say:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, thanks for the clarification. Is there anything I can do?