expat/lib xmlparse.c,1.159,1.160
"Karl Waclawek" <[email protected]> Wed, 06 Sep 2006 07:32:16 -0700
| Newsgroups | gmane.text.xml.expat.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv17016 Modified Files: xmlparse.c Log Message: (s - NULL & 1) would not compiler under GCC 4.0.0. Changed to char* subtraction so that it will compile under MS VC++ and GCC. Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.159 retrieving revision 1.160 diff -u -d -r1.159 -r1.160 --- xmlparse.c 5 Aug 2006 17:00:31 -0000 1.159 +++ xmlparse.c 6 Sep 2006 14:32:12 -0000 1.160 @@ -28,7 +28,8 @@ #define XmlGetInternalEncoding XmlGetUtf16InternalEncoding #define XmlGetInternalEncodingNS XmlGetUtf16InternalEncodingNS #define XmlEncode XmlUtf16Encode -#define MUST_CONVERT(enc, s) (!(enc)->isUtf16 || ((s - NULL) & 1)) +/* Using pointer subtraction to convert to integer type. */ +#define MUST_CONVERT(enc, s) (!(enc)->isUtf16 || (((char *)(s) - (char *)NULL) & 1)) typedef unsigned short ICHAR; #else #define XML_ENCODE_MAX XML_UTF8_ENCODE_MAX