[Bug 271413] textproc/xmlstarlet: fix build with clang 16

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 14 May 2023 13:51:56 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271413

            Bug ID: 271413
           Summary: textproc/xmlstarlet: fix build with clang 16
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: hrs@FreeBSD.org
          Reporter: dim@FreeBSD.org
          Assignee: hrs@FreeBSD.org
             Flags: maintainer-feedback?(hrs@FreeBSD.org)

Clang 16 has a new error about incompatible function types, which shows
up when building textproc/xmlstarlet:

  src/xml_elem.c:271:27: error: incompatible function pointer types passing
'void (void *, void *, xmlChar *)' (aka 'void (void *, void *, unsigned char
*)') to parameter of type 'xmlHashScanner' (aka 'void (*)(void *, void *, const
unsigned char *)') [-Wincompatible-function-pointer-types]
          xmlHashScan(uniq, hash_key_put, &lines);
                            ^~~~~~~~~~~~
  /usr/local/include/libxml2/libxml/hash.h:213:22: note: passing argument to
parameter 'f' here
                                           xmlHashScanner f,
                                                          ^

In this case, the libxml2 callback function requires a const xmlChar
pointer, so fix the parameter in the definition.

-- 
You are receiving this mail because:
You are the assignee for the bug.