Fix VS compile warnings. No functional change.

This commit is contained in:
David Anderson 2018-03-01 14:16:53 -08:00
parent 4d3a787498
commit 2444971f69
1 changed files with 5 additions and 5 deletions

View File

@ -183,13 +183,13 @@ struct XML_PARSER {
if (isascii(c) && isspace(c)) {
if (found_space && attr_buf) {
if (--attr_len > 0) {
*attr_buf++ = c;
*attr_buf++ = (char)c;
}
}
found_space = true;
} else if (c == '/') {
if (--tag_len > 0) {
*buf++ = c;
*buf++ = (char)c;
} else {
return XML_PARSE_OVERFLOW;
}
@ -197,12 +197,12 @@ struct XML_PARSER {
if (found_space) {
if (attr_buf) {
if (--attr_len > 0) {
*attr_buf++ = c;
*attr_buf++ = (char)c;
}
}
} else {
if (--tag_len > 0) {
*buf++ = c;
*buf++ = (char)c;
} else {
return XML_PARSE_OVERFLOW;
}
@ -237,7 +237,7 @@ struct XML_PARSER {
retval = ERR_XML_PARSE;
break;
}
buf[n++] = c;
buf[n++] = (char)c;
buf[n] = 0;
char* p = strstr(buf, end_tag);
if (p) {