On Fri, Dec 09, 2005 at 04:57:06PM -0800, Rick Jones wrote:
> Out of curiousity I downloaded the cvs snapshot on 2005-12-09 which
> expanded to 2.6.22, and tried compiling it on an HP-UX 11.23 Itanium (ia64)
> system with HP aC++/ANSI C B3910B A.06.05 [Jul 25 2005].
>
> A few pseudo-random observations/questions...
>
> This one may have been overly picky on the part of the compiler:
>
> cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g
> -Wp,-H30000 -c parserInternals.c +Z -DPIC -o .libs/parserInternals.lo
> "parserInternals.c", line 1883: warning #2068-D: integer conversion
> resulted in a change of sign
> return (-1);
right, added a cast, as I prefer to not change this API ... this is
unfortunate.
> cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g
> -Wp,-H30000 -c HTMLparser.c +Z -DPIC -o .libs/HTMLparser.lo
> "HTMLparser.c", line 4782: warning #2550-D: variable "oldname" was set but
> never used
> const xmlChar *name, *oldname;
Yup, cosmetic, but cleaned up :-)
>
> Some stuff that probably wants a cast and some unreachable code:
>
> cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g
> -Wp,-H30000 -c xpath.c +Z -
> DPIC -o .libs/xpath.lo
> "xpath.c", line 2915: 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 10483: warning #2513-D: a value of type "void *" cannot be
> assigned to an entity of
> type "xmlXPathFunction"
> XML_CAST_FPTR(func) = op->cache;
I still don't have a good solutions for those. The previous version of
XML_CAST_FPTR() which was attempting a convoluted cast broke register aliasing
on gcc 4 on s390, and all platforms supported so far have no actual problems
storing function pointers in data pointers, gcc also shows up a warning,
I just don't have a nice solution yet at this point.
> "xpath.c", line 11095: warning #2128-D: loop is not reachable from
> preceding code
> do {
> ^
>
hum ... strange, there is a goto next_node below which allows to get
back in that do loop. So it is reachable from following code, not a very
nice piece of code, but I would rather be prudent there.
> next:
>
> cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g
> -Wp,-H30000 -c xmlschemas.c +Z -DPIC -o .libs/xmlschemas.lo
> "xmlschemas.c", line 2500: warning #2550-D: variable "is_not" was set but
> never used
> int i, is_not;
> ^
okay
> "xmlschemas.c", line 7992: warning #2550-D: variable "ns" was set but never
> used
> xmlNsPtr ns;
> ^
okay
> "xmlschemas.c", line 13235: warning #2111-D: statement is unreachable
> return (0);
> ^
okay
> "xmlschemas.c", line 13279: warning #2111-D: statement is unreachable
> return (NULL);
> ^
okay
> "xmlschemas.c", line 17781: warning #2111-D: statement is unreachable
> return (0);
> ^
>
okay
> This one caught my eye:
>
> cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g
> -Wp,-H30000 -c xmlschemastypes.c +Z -DPIC -o .libs/xmlschemastypes.lo
> "xmlschemastypes.c", line 1699: warning #2186-D: pointless comparison of
> unsigned integer with zero
> if ((ret != 0) || (*cur != 0) || !VALID_DATETIME((&(dt->value.date))))
> ^
>
> "xmlschemastypes.c", line 1699: warning #2186-D: pointless comparison of
> unsigned integer with zero
> if ((ret != 0) || (*cur != 0) || !VALID_DATETIME((&(dt->value.date))))
> ^
The macros expands to quite a lot of code. Maybe running on the preprocessor
output would help pinpoint what exactly is at stake there. I don't really
understand the message too ... unless something like u < 0 I don't see the
point being raised.
> This one brings-up another point:
>
> cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g
> -Wp,-H30000 -c xmlmodule.c+Z -DPIC -o .libs/xmlmodule.lo
> "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);
> ^
data vs. function pointers conversions.
> With PA2.0W (64-bit PA) and with IPF/ia64, (either 32 bit or 64) there is
> support for dlopen et al. In fact, the shl_findsym manpage has this to say:
>
> Future HP-UX environments may not support these routines and flags or
> may only support a subset of them. Instead, they will use the SVR4
> dynamic loading API. Users are encouraged to migrate to the dl*
> family of dynamic linking routines. See the dlclose(3C), dlerror(3C),
> dlget(3C), dlgetname(3C), dlmodinfo(3C), dlopen(3C), and dlsym(3C) man
> pages for more information.
>
>
> for some reason while I'm typing the above I am getting a feeling of deja
> vu. anyway...
Well I think we used that code explicitely because dlopen() wasn't available
on old HP-UX systems...
> cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g
> -Wp,-H30000 -c schematron.c +Z -DPIC -o .libs/schematron.lo
> "schematron.c", line 1000: warning #2177-D: function
> "xmlSchematronLoadInclude" was declared but ne
> ver referenced
> xmlSchematronLoadInclude(xmlSchematronParserCtxtPtr ctxt, xmlNodePtr cur)
> ^
yes unfinished code.
> next:
>
> source='testapi.c' object='testapi.o' libtool=no \
> depfile='.deps/testapi.Po' tmpdepfile='.deps/testapi.TPo' \
> depmode=none /bin/sh ./depcomp \
> cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include
> -D_REENTRANT -g -Wp,-H30000 -c `test -f 'testapi.c' || echo
> './'`testapi.c
> "testapi.c", line 286: warning #2068-D: integer conversion resulted in a
> change of sign
> if (no == 2) return('ΓΈ');
> ^
>
> "testapi.c", line 299: warning #2068-D: integer conversion resulted in a
> change of sign
> return(-1);
> ^
>
> "testapi.c", line 311: warning #2068-D: integer conversion resulted in a
> change of sign
> return(-1);
okay, but anything below this is autogenerated, not something I think I
will fix as it requires fixing the generation script.
> and some additional picky stuff:
>
> creating testModule
> source='runtest.c' object='runtest.o' libtool=no \
> depfile='.deps/runtest.Po' tmpdepfile='.deps/runtest.TPo' \
> depmode=none /bin/sh ./depcomp \
> cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include
> -D_REENTRANT -g -Wp,-H30000 -c `test -f 'runtest.c' || echo
> './'`runtest.c
> "runtest.c", line 3142: warning #2550-D: variable "ret" was set but never
> used
> int res = 0, len, ret;
> ^
>
> "runtest.c", line 212: warning #2550-D: variable
> "libxmlMemoryAllocatedBase" was set but never used
> static long libxmlMemoryAllocatedBase = 0;
> ^
okay, I assume it was used to look in a debugging session...
> "runtest.c", line 3859: warning #2177-D: function "thread_specific_data"
> was declared but never referenced
> thread_specific_data(void *private_data)
> ^
not used on HP-UX but used for pthreads systems... let's ignore this
> moving on:
>
> creating runtest
> source='runsuite.c' object='runsuite.o' libtool=no \
> depfile='.deps/runsuite.Po' tmpdepfile='.deps/runsuite.TPo' \
> depmode=none /bin/sh ./depcomp \
> cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include
> -D_REENTRANT -g -Wp,-H30000 -c `test -f 'runsuite.c' || echo
> './'`runsuite.c
> "runsuite.c", line 1054: warning #2550-D: variable "res" was set but never
> used
> int res, ret = 0;
> ^
okay
> "runsuite.c", line 96: warning #2550-D: variable
> "libxmlMemoryAllocatedBase" was set but never used
> static long libxmlMemoryAllocatedBase = 0;
same thing
> then:
>
> creating parse3
> source='tree2.c' object='tree2.o' libtool=no \
> depfile='.deps/tree2.Po' tmpdepfile='.deps/tree2.TPo' \
> depmode=none /bin/sh ../../depcomp \
> cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I../../include
> -I./include -D_REENTRANT -g -Wp,-H30000 -c `test -f 'tree2.c' || echo
> './'`tree2.c
> "tree2.c", line 30: warning #2550-D: variable "dtd" was set but never used
> xmlDtdPtr dtd = NULL; /* DTD pointer */
> ^
it's for educational purpose, I will ignore this as this may be useful in
code reuse.
> and then finally, an outright build error:
>
> creating parse2
> No suffix list.
> sh: /usr/bin/xsltproc: not found.
> *** Error exit code 127 (ignored)
> sh: /usr/bin/xsltproc: not found.
> *** Error exit code 127 (ignored)
> sh: /usr/bin/xsltproc: not found.
> *** Error exit code 127 (ignored)
> sh: /usr/bin/xsltproc: not found.
> *** Error exit code 127 (ignored)
> Making all in example
>
> there is no xsltproc on the system:
configure should have found this ... strange ...
> though I must admit my ability to quickly parse shell stuff is pretty weak.
and my ability to read generated configure code, is not much better...
I have fixed all okay'ed, and will commit as soon as I verify all regression
tests still pass as expected.
thanks,
Daniel
--
Daniel Veillard | Red Hat http://redhat.com/
[EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml