Mon, 11 Mar 2024 04:29:48 -0500
Explicitly cast libxml error handler function
Depending on compiler options, the `const` → non-`const` argument can fail in just the same way as it did in reverse. So add an explicit cast to silence that.
Testing Done:
Compiled with `gcc` and `clang` on a system with older libxml2, which still had the non-`const` type. There, `gcc` raises a warning, but `clang` seems to think this is a fatal error.
Reviewed at https://reviews.imfreedom.org/r/3016/
| libpurple/protocols/bonjour/parser.c | file | annotate | diff | comparison | revisions | |
| libpurple/protocols/jabber/parser.c | file | annotate | diff | comparison | revisions |
--- a/libpurple/protocols/bonjour/parser.c Fri Mar 08 02:28:05 2024 -0600 +++ b/libpurple/protocols/bonjour/parser.c Mon Mar 11 04:29:48 2024 -0500 @@ -202,7 +202,7 @@ NULL, /*_private*/ bonjour_parser_element_start_libxml, /*startElementNs*/ bonjour_parser_element_end_libxml, /*endElementNs*/ - bonjour_parser_structured_error_handler /*serror*/ + (xmlStructuredErrorFunc)bonjour_parser_structured_error_handler /*serror*/ }; void
--- a/libpurple/protocols/jabber/parser.c Fri Mar 08 02:28:05 2024 -0600 +++ b/libpurple/protocols/jabber/parser.c Mon Mar 11 04:29:48 2024 -0500 @@ -240,7 +240,7 @@ NULL, /*_private*/ jabber_parser_element_start_libxml, /*startElementNs*/ jabber_parser_element_end_libxml, /*endElementNs*/ - jabber_parser_structured_error_handler /*serror*/ + (xmlStructuredErrorFunc)jabber_parser_structured_error_handler /*serror*/ }; void