Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- This resolves several warnings when compiling with GCC 8.1. --- dlls/msxml3/schema.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c index 8087985204..faf9cd0aa2 100644 --- a/dlls/msxml3/schema.c +++ b/dlls/msxml3/schema.c @@ -980,7 +980,7 @@ static cache_entry* cache_entry_from_url(VARIANT url, xmlChar const* nsURI, MSXM return entry; }
-static void cache_free(void* data, xmlChar* name /* ignored */) +static void cache_free(void* data, const xmlChar* name /* ignored */) { cache_entry_release((cache_entry*)data); } @@ -1397,7 +1397,7 @@ static HRESULT WINAPI schema_cache_get_namespaceURI(IXMLDOMSchemaCollection2* if return S_OK; }
-static void cache_copy(void* data, void* dest, xmlChar* name) +static void cache_copy(void* data, void* dest, const xmlChar* name) { schema_cache* This = (schema_cache*) dest; cache_entry* entry = (cache_entry*) data;
On 07/12/2018 03:30 PM, Alex Henrie wrote:
Signed-off-by: Alex Henrie alexhenrie24@gmail.com
This resolves several warnings when compiling with GCC 8.1.
dlls/msxml3/schema.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msxml3/schema.c b/dlls/msxml3/schema.c index 8087985204..faf9cd0aa2 100644 --- a/dlls/msxml3/schema.c +++ b/dlls/msxml3/schema.c @@ -980,7 +980,7 @@ static cache_entry* cache_entry_from_url(VARIANT url, xmlChar const* nsURI, MSXM return entry; }
-static void cache_free(void* data, xmlChar* name /* ignored */) +static void cache_free(void* data, const xmlChar* name /* ignored */) { cache_entry_release((cache_entry*)data); } @@ -1397,7 +1397,7 @@ static HRESULT WINAPI schema_cache_get_namespaceURI(IXMLDOMSchemaCollection2* if return S_OK; }
-static void cache_copy(void* data, void* dest, xmlChar* name) +static void cache_copy(void* data, void* dest, const xmlChar* name) { schema_cache* This = (schema_cache*) dest; cache_entry* entry = (cache_entry*) data;
Unfortunately it's not about gcc, it's a libxml2 change [1], looks like first affected version is 2.9.8. This commit is good in a sense that it removes pointer casts, and uses correct prototypes everywhere. Why did they have to change public prototype signature, for argument that wasn't used in a first place, that I don't understand. I wonder if Daniel would be open to revert this back to what it was, otherwise we'll need a version check around those helpers to suppress the warning.
[1] https://gitlab.gnome.org/GNOME/libxml2/commit/e03f0a199a67017b2f8052354cf732...
On Thu, Jul 12, 2018 at 3:16 PM Nikolay Sivov nsivov@codeweavers.com wrote:
On 07/12/2018 03:30 PM, Alex Henrie wrote:
This resolves several warnings when compiling with GCC 8.1.
Unfortunately it's not about gcc, it's a libxml2 change [1], looks like first affected version is 2.9.8. This commit is good in a sense that it removes pointer casts, and uses correct prototypes everywhere. Why did they have to change public prototype signature, for argument that wasn't used in a first place, that I don't understand. I wonder if Daniel would be open to revert this back to what it was, otherwise we'll need a version check around those helpers to suppress the warning.
[1] https://gitlab.gnome.org/GNOME/libxml2/commit/e03f0a199a67017b2f8052354cf732...
Thanks for the explanation. At least the change didn't break binary compatibility. I wonder if the parameter was meant to be const all along and omitting the keyword was a mistake that libxml2 is now trying to fix?
-Alex
On Thu, Jul 12, 2018 at 5:26 PM, Alex Henrie alexhenrie24@gmail.com wrote:
On Thu, Jul 12, 2018 at 3:16 PM Nikolay Sivov nsivov@codeweavers.com wrote:
On 07/12/2018 03:30 PM, Alex Henrie wrote:
This resolves several warnings when compiling with GCC 8.1.
Unfortunately it's not about gcc, it's a libxml2 change [1], looks like first affected version is 2.9.8. This commit is good in a sense that it removes pointer casts, and uses correct prototypes everywhere. Why did they have to change public prototype signature, for argument that wasn't used in a first place, that I don't understand. I wonder if Daniel would be open to revert this back to what it was, otherwise we'll need a version check around those helpers to suppress the warning.
[1] https://gitlab.gnome.org/GNOME/libxml2/commit/e03f0a199a67017b2f8052354cf732...
Thanks for the explanation. At least the change didn't break binary compatibility. I wonder if the parameter was meant to be const all along and omitting the keyword was a mistake that libxml2 is now trying to fix?
-Alex
The bug report for that commit is at https://bugzilla.gnome.org/show_bug.cgi?id=784861