diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-04-15 09:58:19 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-04-15 09:58:19 +0200 |
| commit | 53e07bac79c657ec93e8acf6f9e0c94d04c42de3 (patch) | |
| tree | f4aa1a2200a74d36e83cea2bc662050c5c9e5255 /ext | |
| parent | 8e5df6092ded14164e6784e304db4b675e8465a4 (diff) | |
| download | php-git-53e07bac79c657ec93e8acf6f9e0c94d04c42de3.tar.gz | |
Fix function libxml free error signature
Fixes a -Wcast-function-type warning.
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/libxml/libxml.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index ec72c79b60..f015c71d24 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -418,11 +418,10 @@ php_libxml_output_buffer_create_filename(const char *URI, return(ret); } -static int _php_libxml_free_error(xmlErrorPtr error) +static void _php_libxml_free_error(void *ptr) { /* This will free the libxml alloc'd memory */ - xmlResetError(error); - return 1; + xmlResetError((xmlErrorPtr) ptr); } static void _php_list_set_error_structure(xmlErrorPtr error, const char *msg) @@ -943,7 +942,7 @@ PHP_FUNCTION(libxml_use_internal_errors) xmlSetStructuredErrorFunc(NULL, php_libxml_structured_error_handler); if (LIBXML(error_list) == NULL) { LIBXML(error_list) = (zend_llist *) emalloc(sizeof(zend_llist)); - zend_llist_init(LIBXML(error_list), sizeof(xmlError), (llist_dtor_func_t) _php_libxml_free_error, 0); + zend_llist_init(LIBXML(error_list), sizeof(xmlError), _php_libxml_free_error, 0); } } RETURN_BOOL(retval); |
