diff --git a/expat/examples/element_declarations.c b/expat/examples/element_declarations.c index 7ce8544f..2ec7fbfd 100644 --- a/expat/examples/element_declarations.c +++ b/expat/examples/element_declarations.c @@ -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"); } diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index d9285b21..c590ebf9 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -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, diff --git a/expat/xmlwf/xmlfile.c b/expat/xmlwf/xmlfile.c index 0598b86b..a9e6bcba 100644 --- a/expat/xmlwf/xmlfile.c +++ b/expat/xmlwf/xmlfile.c @@ -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. */