On Sun, 2005-05-08 at 20:10 -0400, Ignacio Vazquez-Abrams wrote: > On Sun, 2005-05-08 at 23:13 +0200, Aurelien Bompard wrote: > > I know very little of C, and I've got a build failure with GCC4 I'd need > > help with : > > in the "wv" package : > > wvConfig.c:2134: error: static declaration of 'startElement' follows > > non-static declaration > > /usr/include/libxml2/libxml/SAX.h:110: error: previous declaration of > > 'startElement' was here > > wvConfig.c:3098: error: static declaration of 'endElement' follows > > non-static declaration > > /usr/include/libxml2/libxml/SAX.h:113: error: previous declaration of > > 'endElement' was here > > > > In the wvConfig.c file, at line 2134 and 3098, startElement and endElement > > are defined, in about 950 and 250 code lines respectively. > > What should I do in this case ? > > Looks like the upstream developer is abusing the compiler. I'm not > certain whether the declarations should be changed to match the ones in > the headers, or if the function names should be changed. Give me a few > hours and I can look at it deeper. Okay, give this one a try. Make sure that the app itself still works as expected after. -- Ignacio Vazquez-Abrams <ivazquez ivazquez net> http://fedora.ivazquez.net/ gpg --keyserver hkp://subkeys.pgp.net --recv-key 38028b72
--- wv-1.0.0/wvConfig.c.gcc4 2005-05-08 23:17:35.000000000 -0400
+++ wv-1.0.0/wvConfig.c 2005-05-08 23:18:42.000000000 -0400
@@ -2130,7 +2130,7 @@
}
static void
-startElement (void *userData, const XML_Char *name, const XML_Char **atts)
+wvStartElement (void *userData, const XML_Char *name, const XML_Char **atts)
{
unsigned int nAtts = 0;
const XML_Char **p;
@@ -3094,7 +3094,7 @@
}
static void
-endElement (void *userData, const XML_Char *name)
+wvEndElement (void *userData, const XML_Char *name)
{
state_data *mydata = (state_data *) userData;
unsigned int token_type;
@@ -3470,8 +3470,8 @@
memset(&hdl, 0, sizeof(hdl));
hdl.getEntity = _getEntity;
- hdl.startElement = startElement;
- hdl.endElement = endElement;
+ hdl.startElement = wvStartElement;
+ hdl.endElement = wvEndElement;
hdl.characters = charData;
if (myhandle->fp)
@@ -3514,7 +3514,7 @@
size_t len;
XML_SetUserData (parser, myhandle);
- XML_SetElementHandler (parser, startElement, endElement);
+ XML_SetElementHandler (parser, wvStartElement, wvEndElement);
XML_SetCharacterDataHandler (parser, charData);
if (myhandle->fp == NULL)
Attachment:
signature.asc
Description: This is a digitally signed message part