Merge pull request #816 from a-lunkov/master

Suppress UndefinedBehaviorSanitizer warnings
This commit is contained in:
Lee Thomason
2020-06-13 17:52:03 -07:00
committed by GitHub

View File

@@ -234,13 +234,13 @@ char* StrPair::ParseName( char* p )
if ( !p || !(*p) ) { if ( !p || !(*p) ) {
return 0; return 0;
} }
if ( !XMLUtil::IsNameStartChar( *p ) ) { if ( !XMLUtil::IsNameStartChar( (unsigned char) *p ) ) {
return 0; return 0;
} }
char* const start = p; char* const start = p;
++p; ++p;
while ( *p && XMLUtil::IsNameChar( *p ) ) { while ( *p && XMLUtil::IsNameChar( (unsigned char) *p ) ) {
++p; ++p;
} }
@@ -1909,7 +1909,7 @@ char* XMLElement::ParseAttributes( char* p, int* curLineNumPtr )
} }
// attribute. // attribute.
if (XMLUtil::IsNameStartChar( *p ) ) { if (XMLUtil::IsNameStartChar( (unsigned char) *p ) ) {
XMLAttribute* attrib = CreateAttribute(); XMLAttribute* attrib = CreateAttribute();
TIXMLASSERT( attrib ); TIXMLASSERT( attrib );
attrib->_parseLineNum = _document->_parseCurLineNum; attrib->_parseLineNum = _document->_parseCurLineNum;