Re: [xml] strchr in xmlschemas.c
- From: Philip Ludlam <nospam philipnet com>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] strchr in xmlschemas.c
- Date: Mon, 5 Apr 2004 10:36:14 +0100
On Mon, 5 Apr 2004 at 03:09 -0400 Daniel Veillard wrote:
On Sun, Apr 04, 2004 at 05:40:45PM +0100, Philip Ludlam wrote:
Dear All,
My C implementation defines strchr to have 2 arguments, the 1st being
a char* .
As xmlChar is an unsigned char and not a char, my C compiler faults the
use of strchr at line 1495 in xmlschemas.c in libxml2-2.6.8
The attached patch calls xmlStrchr in it's place.
This was fixed by using
if (!strchr((char *) val, ':'))
in CVS already,
Ah, I checked that yesterday - but I guess the change hadn't filtered through to the anoncvs server.
But I don't think that fix is wholly suitable - what if you or someone else changes the definition of
xmlChar? Then casting an xmlChar * to a char * will inevitably cause problems further down the line.
Yours,
Phil L.
--
http://www.philipnet.com | http://director.sourceforge.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]