Re: [xml] HP-UX compilation warnings for 2.6.23



On Wed, Feb 22, 2006 at 03:57:34PM -0800, Rick Jones wrote:
Attached is the typescript for a compiation of vanilla 2.6.23 on an HP-UX 
11.23 Itanium system with the HP compiler (some version or other :)
[...]
"xpath.c", line 2927: warning #2513-D: a value of type "void *" cannot be
          assigned to an entity of type "xmlXPathFunction"
      XML_CAST_FPTR(ret) = xmlHashLookup2(ctxt->funcHash, name, ns_uri);
                         ^

"xpath.c", line 10495: warning #2513-D: a value of type "void *" cannot be
          assigned to an entity of type "xmlXPathFunction"
                      XML_CAST_FPTR(func) = op->cache;
                                          ^

  that's a problem of a function pointer being cast to a data pointer in XPath
and unless making some nasty changes it's hard to fix, since it's kind of
part of the API now.

"xpath.c", line 11113: warning #2128-D: loop is not reachable from preceding
          code
      do {
      ^

  looks buggy to me, there is a goto next_node; below the loop, and 
next_node is declared inside the loop, not very nice, but I think the compiler
is in error, probably worth pointing to your compiler engineers...

"xmlschemastypes.c", line 1699: warning #2186-D: pointless comparison of
          unsigned integer with zero
      if ((ret != 0) || (*cur != 0) || (!(VALID_DATETIME((&(dt->value.date))))))

  I think it's a side effect of changing one of the fields of 
struct _xmlSchemaValDate to unsigned it (which was causing a regression
precisely on itanium), but I can't guess which one from the large macro,
not a big deal.

"xmlmodule.c", line 284: warning #2167-D: argument of type "void **" is
          incompatible with parameter of type "shl_t *"
      rc = shl_findsym(&handle, name, TYPE_UNDEFINED, symbol);

  IIRC it's a problem of portability of the shared libs loading APIs 
between platforms. If you can generate an HP-UX specific patch that would be
good !


"schematron.c", line 1000: warning #2177-D: function "xmlSchematronLoadInclude"
          was declared but never referenced
  xmlSchematronLoadInclude(xmlSchematronParserCtxtPtr ctxt, xmlNodePtr cur)
  ^

  schematron.c is kind of experimental and not really finished module. I could
not get a test suite to run against to check conformance for the last version,
and the inclusion code is not finished.

        source='testapi.c' object='testapi.o' libtool=no \
        DEPDIR=.deps depmode=none /bin/sh ./depcomp \
        cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include  -D_REENTRANT       -g -c testapi.c
"testapi.c", line 2141: warning #2191-D: type qualifier is meaningless on cast
          type
          ret_val = htmlNodeStatus((const htmlNodePtr)node, legacy);
                                    ^

  testapi.c is generated code and not part of the library itself, those warning
are not really anything to worry about.

"runtest.c", line 3140: warning #2550-D: variable "ret" was set but never used
      int res = 0, len, ret;
                        ^

   Sounds familiar, there is a bug there about the number of error reported...

"runtest.c", line 3857: warning #2177-D: function "thread_specific_data" was
          declared but never referenced
  thread_specific_data(void *private_data)
  ^

   Seems testThread() is not defined in the case of HP-UX, either extend
#if defined(linux) || defined(solaris) around line 3900 or define a specific
test for the OS. Patch welcome !

"tree2.c", line 30: warning #2550-D: variable "dtd" was set but never used
      xmlDtdPtr dtd = NULL;       /* DTD pointer */
                ^

   Right, but as an example dropping the result of a function returning a
node would be of bad taste, keeping it is better.


Daniel


-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]