Merge pull request #914 from hannob/fixformatsign

Fix signedness of format strings
This commit is contained in:
Sebastian Pipping 2024-10-23 17:44:39 +02:00 committed by GitHub
commit cba3e03bbc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 7 deletions

View file

@ -127,15 +127,15 @@ dumpContentModelElement(const XML_Content *model, unsigned level,
}
// Node
printf("[%u] type=%s(%d), quant=%s(%d)", (unsigned)(model - root),
contentTypeName(model->type), model->type,
contentQuantName(model->quant), model->quant);
printf("[%u] type=%s(%u), quant=%s(%u)", (unsigned)(model - root),
contentTypeName(model->type), (unsigned int)model->type,
contentQuantName(model->quant), (unsigned int)model->quant);
if (model->name) {
printf(", name=\"%" XML_FMT_STR "\"", model->name);
} else {
printf(", name=NULL");
}
printf(", numchildren=%d", model->numchildren);
printf(", numchildren=%u", model->numchildren);
printf("\n");
}

View file

@ -7856,7 +7856,7 @@ accountingReportDiff(XML_Parser rootParser,
assert(! rootParser->m_parentParser);
fprintf(stderr,
" (+" EXPAT_FMT_PTRDIFF_T("6") " bytes %s|%d, xmlparse.c:%d) %*s\"",
" (+" EXPAT_FMT_PTRDIFF_T("6") " bytes %s|%u, xmlparse.c:%d) %*s\"",
bytesMore, (account == XML_ACCOUNT_DIRECT) ? "DIR" : "EXP",
levelsAwayFromRootParser, source_line, 10, "");
@ -7969,7 +7969,7 @@ entityTrackingReportStats(XML_Parser rootParser, ENTITY *entity,
fprintf(
stderr,
"expat: Entities(%p): Count %9d, depth %2d/%2d %*s%s%s; %s length %d (xmlparse.c:%d)\n",
"expat: Entities(%p): Count %9u, depth %2u/%2u %*s%s%s; %s length %d (xmlparse.c:%d)\n",
(void *)rootParser, rootParser->m_entity_stats.countEverOpened,
rootParser->m_entity_stats.currentDepth,
rootParser->m_entity_stats.maximumDepthSeen,

View file

@ -91,7 +91,8 @@ reportError(XML_Parser parser, const XML_Char *filename) {
filename, XML_GetErrorLineNumber(parser),
XML_GetErrorColumnNumber(parser), message);
else
ftprintf(stderr, T("%s: (unknown message %d)\n"), filename, code);
ftprintf(stderr, T("%s: (unknown message %u)\n"), filename,
(unsigned int)code);
}
/* This implementation will give problems on files larger than INT_MAX. */