Address "comparison between signed and unsigned integer" warnings

This commit is contained in:
Sebastian Pipping 2016-03-28 21:24:36 +02:00
parent 934bcb0ac6
commit 3bd715bf75

View File

@ -47,7 +47,7 @@ CharData_AppendString(CharData *storage, const char *s)
if ((len + storage->count) > maxchars) {
len = (maxchars - storage->count);
}
if (len + storage->count < sizeof(storage->data)) {
if (len + storage->count < (int)sizeof(storage->data)) {
memcpy(storage->data + storage->count, s, len);
storage->count += len;
}
@ -68,7 +68,7 @@ CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len)
if ((len + storage->count) > maxchars) {
len = (maxchars - storage->count);
}
if (len + storage->count < sizeof(storage->data)) {
if (len + storage->count < (int)sizeof(storage->data)) {
memcpy(storage->data + storage->count, s,
len * sizeof(storage->data[0]));
storage->count += len;