xerces: fixed compilation

This commit is contained in:
Sergii Pylypenko
2019-06-14 16:44:43 +03:00
parent ff8594202d
commit dd184b184e
6 changed files with 17 additions and 19 deletions

View File

@@ -11,13 +11,11 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/src $(LOCAL_PATH)/include \
$(LOCAL_PATH)/include/xercesc/dom/ $(LOCAL_PATH)/include/xercesc/dom/impl \
$(LOCAL_PATH)/include/xercesc/validators/schema/identity $(LOCAL_PATH)/include/xercesc/util/Transcoders/IconvGNU/ \
$(LOCAL_PATH)/include/xercesc/sax
LOCAL_CFLAGS := -Os -DHAVE_CONFIG_H
LOCAL_CFLAGS := -Os -DHAVE_CONFIG_H -frtti -fexceptions
LOCAL_CPP_EXTENSION := .cpp
LOCAL_SRC_FILES := $(addprefix src/,$(notdir $(wildcard $(LOCAL_PATH)/src/*.cpp $(LOCAL_PATH)/src/*.c)))
LOCAL_SRC_FILES += $(foreach F, $(XERCES_SUBDIRS), $(addprefix $(F)/,$(notdir $(wildcard $(LOCAL_PATH)/$(F)/*.cpp))))
LOCAL_SHARED_LIBRARIES := sdl-$(SDL_VERSION)
include $(BUILD_STATIC_LIBRARY)

View File

@@ -224,7 +224,7 @@
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/timeb.h> header file. */
#define HAVE_SYS_TIMEB_H 1
/* #undef HAVE_SYS_TIMEB_H */
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1

View File

@@ -107,7 +107,7 @@ void XMLUTF8Transcoder::checkTrailingBytes(const XMLByte toCheck
{
char len[2] = {(char)(trailingBytes+0x31), 0};
char pos[2] = {(char)(position+0x31), 0};
char byte[2] = {toCheck,0};
char byte[2] = {(char)toCheck,0};
ThrowXMLwithMemMgr3(UTFDataFormatException, XMLExcepts::UTF8_FormatError, pos, byte, len, getMemoryManager());
}

View File

@@ -178,7 +178,7 @@ XMLUTF8Transcoder::transcodeFrom(const XMLByte* const srcData
if((gUTFByteIndicatorTest[trailingBytes] & *srcPtr) != gUTFByteIndicator[trailingBytes]) {
char pos[2] = {(char)0x31, 0};
char len[2] = {(char)(trailingBytes+0x31), 0};
char byte[2] = {*srcPtr,0};
char byte[2] = {(char)*srcPtr,0};
ThrowXMLwithMemMgr3(UTFDataFormatException, XMLExcepts::UTF8_FormatError, pos, byte, len, getMemoryManager());
}
@@ -246,8 +246,8 @@ XMLUTF8Transcoder::transcodeFrom(const XMLByte* const srcData
//
if (( *srcPtr == 0xE0) && ( *(srcPtr+1) < 0xA0))
{
char byte0[2] = {*srcPtr ,0};
char byte1[2] = {*(srcPtr+1),0};
char byte0[2] = {(char)*srcPtr ,0};
char byte1[2] = {(char)*(srcPtr+1),0};
ThrowXMLwithMemMgr2(UTFDataFormatException
, XMLExcepts::UTF8_Invalid_3BytesSeq
@@ -284,8 +284,8 @@ XMLUTF8Transcoder::transcodeFrom(const XMLByte* const srcData
if ((*srcPtr == 0xED) && (*(srcPtr+1) >= 0xA0))
{
char byte0[2] = {*srcPtr, 0};
char byte1[2] = {*(srcPtr+1),0};
char byte0[2] = {(char)*srcPtr, 0};
char byte1[2] = {(char)*(srcPtr+1),0};
ThrowXMLwithMemMgr2(UTFDataFormatException
, XMLExcepts::UTF8_Irregular_3BytesSeq
@@ -310,8 +310,8 @@ XMLUTF8Transcoder::transcodeFrom(const XMLByte* const srcData
if (((*srcPtr == 0xF0) && (*(srcPtr+1) < 0x90)) ||
((*srcPtr == 0xF4) && (*(srcPtr+1) > 0x8F)) )
{
char byte0[2] = {*srcPtr ,0};
char byte1[2] = {*(srcPtr+1),0};
char byte0[2] = {(char)*srcPtr ,0};
char byte1[2] = {(char)*(srcPtr+1),0};
ThrowXMLwithMemMgr2(UTFDataFormatException
, XMLExcepts::UTF8_Invalid_4BytesSeq
@@ -344,7 +344,7 @@ XMLUTF8Transcoder::transcodeFrom(const XMLByte* const srcData
* surrogates, nor U+FFFE and U+FFFF (but it does allow other noncharacters).
***/
char len[2] = {(char)(trailingBytes+0x31), 0};
char byte[2] = {*srcPtr,0};
char byte[2] = {(char)*srcPtr,0};
ThrowXMLwithMemMgr2(UTFDataFormatException
, XMLExcepts::UTF8_Exceeds_BytesLimit

View File

@@ -156,7 +156,7 @@ XMLInt32 ParserForXMLSchema::decodeEscaped() {
break;
default:
{
XMLCh chString[] = {chBackSlash, ch, chNull};
XMLCh chString[] = {chBackSlash, (XMLCh)ch, chNull};
ThrowXMLwithMemMgr1(ParseException,XMLExcepts::Parser_Process2, chString, getMemoryManager());
}
}

View File

@@ -691,11 +691,11 @@ RangeToken* RegxParser::parseCharacterClass(const bool useNRange) {
|| (ch == chDash && getCharData() == chCloseSquare && firstLoop))) {
// if regex = [-] then invalid...
// '[', ']', '-' not allowed and should be escaped
XMLCh chStr[] = { ch, chNull };
XMLCh chStr[] = { (XMLCh)ch, chNull };
ThrowXMLwithMemMgr2(ParseException,XMLExcepts::Parser_CC6, chStr, chStr, getMemoryManager());
}
if (ch == chDash && getCharData() == chDash && getState() != REGX_T_BACKSOLIDUS && !wasDecoded) {
XMLCh chStr[] = { ch, chNull };
XMLCh chStr[] = { (XMLCh)ch, chNull };
ThrowXMLwithMemMgr2(ParseException,XMLExcepts::Parser_CC6, chStr, chStr, getMemoryManager());
}
@@ -720,7 +720,7 @@ RangeToken* RegxParser::parseCharacterClass(const bool useNRange) {
else {
XMLInt32 rangeEnd = getCharData();
XMLCh rangeEndStr[] = { rangeEnd, chNull };
XMLCh rangeEndStr[] = { (XMLCh)rangeEnd, chNull };
if (type == REGX_T_CHAR) {
@@ -737,7 +737,7 @@ RangeToken* RegxParser::parseCharacterClass(const bool useNRange) {
processNext();
if (ch > rangeEnd) {
XMLCh chStr[] = { ch, chNull };
XMLCh chStr[] = { (XMLCh)ch, chNull };
ThrowXMLwithMemMgr2(ParseException,XMLExcepts::Parser_Ope3, rangeEndStr, chStr, getMemoryManager());
}
@@ -845,7 +845,7 @@ XMLInt32 RegxParser::decodeEscaped() {
break;
default:
{
XMLCh chString[] = {chBackSlash, ch, chNull};
XMLCh chString[] = {chBackSlash, (XMLCh)ch, chNull};
ThrowXMLwithMemMgr1(ParseException,XMLExcepts::Parser_Process2, chString, getMemoryManager());
}
}