libwebp: Remove char-subscripts warning in pnmdec.c

Change-Id: I7a771e17fca0ba8a49a816b48cc477ad7a03a435
This commit is contained in:
Yannis Guyon 2019-10-16 17:58:30 +02:00
parent 2fa2552db1
commit 17850e74ce

View File

@ -111,7 +111,8 @@ static size_t ReadPAMFields(PNMInfo* const info, size_t off) {
int i;
if (out_size > 20) sprintf(out + 20 - strlen(kEllipsis), kEllipsis);
for (i = 0; i < (int)strlen(out); ++i) {
if (!isprint(out[i])) out[i] = ' ';
// isprint() might trigger a "char-subscripts" warning if given a char.
if (!isprint((int)out[i])) out[i] = ' ';
}
fprintf(stderr, "PAM header error: unrecognized entry [%s]\n", out);
return 0;