Commit e218e95e authored by Mike Hibler's avatar Mike Hibler

Patch file to account for more anal clang 6.

parent 18e4e1cd
--- src/xercesc/util/XMLUTF8Transcoder.cpp.orig 2007-08-28 12:44:52.000000000 -0600
+++ src/xercesc/util/XMLUTF8Transcoder.cpp 2018-07-31 08:31:22.801783000 -0600
@@ -186,7 +186,7 @@
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());
}
@@ -254,8 +254,8 @@
//
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
@@ -292,8 +292,8 @@
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
@@ -318,8 +318,8 @@
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
@@ -352,7 +352,7 @@
* 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_Exceede_BytesLimit
--- src/xercesc/util/XMLUTF8Transcoder.hpp.orig 2007-08-28 12:44:52.000000000 -0600
+++ src/xercesc/util/XMLUTF8Transcoder.hpp 2018-07-31 08:28:28.797006000 -0600
@@ -103,7 +103,7 @@
{
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());
}
--- src/xercesc/util/regx/ParserForXMLSchema.cpp.orig 2007-08-28 12:44:32.000000000 -0600
+++ src/xercesc/util/regx/ParserForXMLSchema.cpp 2018-07-31 08:41:41.848114000 -0600
@@ -213,11 +213,11 @@
|| (ch == chDash && getCharData() == chCloseSquare && firstLoop))) {
// if regex = [-] then invalid...
// '[', ']', '-' not allowed and should be esacaped
- 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());
}
@@ -242,7 +242,7 @@
else {
XMLInt32 rangeEnd = getCharData();
- XMLCh rangeEndStr[] = { rangeEnd, chNull };
+ XMLCh rangeEndStr[] = { (XMLCh)rangeEnd, chNull };
if (type == REGX_T_CHAR) {
@@ -259,7 +259,7 @@
processNext();
if (ch > rangeEnd) {
- XMLCh chStr[] = { ch, chNull };
+ XMLCh chStr[] = { (XMLCh)ch, chNull };
ThrowXMLwithMemMgr2(ParseException,XMLExcepts::Parser_Ope3, rangeEndStr, chStr, getMemoryManager());
}
@@ -481,8 +481,8 @@
case chCloseSquare:
break;
default:
- {
- XMLCh chString[] = {chBackSlash, ch, chNull};
+ {
+ XMLCh chString[] = {chBackSlash, (XMLCh)ch, chNull};
ThrowXMLwithMemMgr1(ParseException,XMLExcepts::Parser_Process2, chString, getMemoryManager());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment