Re: [xml] minor declaration fixes for xpath2.c and xmlregexp.c in 2.6.17



[ could you check your list subscription, I need to manually approve all
  your mails, thanks ]

On Wed, Mar 09, 2005 at 11:30:36AM -0800, Rick Jones wrote:
which seems to stem from the forward declaration of usage being static, but 
the actual definition not:

  okay fixed, thanks.

 cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g 
-Wp,-H30000 -c xmlregexp.c -Wp,-M.deps/xmlregexp.TPlo  +Z -DPIC -o 
.libs/xmlregexp.o
cc: "xmlregexp.c", line 3350: warning 604: Pointers are not 
assignment-compatible.
cc: "xmlregexp.c", line 3350: warning 563: Argument #5 is not the correct 
type.
[...]
Where the code is:

#ifdef DEBUG_ERR
static void testerr(xmlRegExecCtxtPtr exec) {
    const xmlChar *string;
    const xmlChar *values[5];
    int nb = 5;
    int nbneg;
    int terminal;
    xmlRegExecErrInfo(exec, &string, &nb, &nbneg, &values[0], &terminal);
}
#endif

  DEBUG_ERR should not be defined and that code should not be compiled
by default it was a packaging mistake :-\

I'm guessing that since values is not assigned before calling 
xmlRegExecErrInfo it is indeed expecting the call to make a change to the 
values in values[0] and so the fix would be to drop the const:
[...]
but that was just a guess and could easily be wrong.

   the array is not const, but the objects pointed by the array pointers
should be const. Not a big deal.

That takes care of 11.11 compilation - I didn't yet try a run.  There are 
some other things on 11.23 IPF (aka Itanium aka IA64) that probably belong 
under separate cover.  They likely relate to there being no shl_load call 
for HP-UX IPF binaries - dlopen et al being the calls used.  Dlopen et al 
are also available on later HP-UX PA-RISC releases, so it may be a matter 
of tweaking some configure stuff.

  sure, send more patches :-), could be a good idea to use the cvs
checkout version for further patches 
   ftp://xmlsoft.org/libxml2-cvs-snapshot.tar.gz

    thanks !

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team 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]