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

Fix const-correctness with libxml2-2.12.0 #408

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

ppisar
Copy link
Contributor

@ppisar ppisar commented Nov 24, 2023

libxml2-2.12.0 started to return errors as a pointer to a constant structure and GCC 13.2.1 started to warn like this:

/home/test/createrepo_c/src/xml_parser.c: In function ‘cr_xml_parser_generic’: /home/test/createrepo_c/src/xml_parser.c:204:35: warning: initialization discards ‘const’ qualifier fro m pointer target type [-Wdiscarded-qualifiers]
204 | xmlErrorPtr xml_err = xmlCtxtGetLastError(parser);
| ^~~~~~~~~~~~~~~~~~~

This patch fixes it.

libxml2-2.12.0 started to return errors as a pointer to a constant
structure and GCC 13.2.1 started to warn like this:

/home/test/createrepo_c/src/xml_parser.c: In function ‘cr_xml_parser_generic’:
/home/test/createrepo_c/src/xml_parser.c:204:35: warning: initialization discards ‘const’ qualifier fro
m pointer target type [-Wdiscarded-qualifiers]
  204 |             xmlErrorPtr xml_err = xmlCtxtGetLastError(parser);
      |                                   ^~~~~~~~~~~~~~~~~~~

This patch fixes it.
Copy link
Contributor

@kontura kontura left a comment

Choose a reason for hiding this comment

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

Thank you.

@kontura kontura merged commit 79ad431 into rpm-software-management:master Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants