Fix const correctness with libxml2 >= 2.12.0#625
Merged
Conversation
If configured with -DENABLE_RPMMD=ON -DWITH_LIBXML2=ON and building
with libxml2-2.13.9, this warning was reported:
/home/test/libsolv/ext/solv_xmlparser.c:294:25: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
294 | xmlErrorPtr err = xmlCtxtGetLastError(xmlp->parser);
| ^~~~~~~~~~~~~~~~~~~
The cause was that libxml2 2.12.0 changed a prototype of
xmlCtxtGetLastError(). This patch fixes it.
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
If configured with -DENABLE_RPMMD=ON -DWITH_LIBXML2=ON and building with libxml2-2.13.9, this warning was reported:
The cause was that libxml2 2.12.0 changed a prototype of xmlCtxtGetLastError(). This patch fixes it.