From: Karl Waclawek Date: Fri, 14 Apr 2006 18:03:57 +0000 (+0000) Subject: Casting away some integer conversion warnings that should not pose a problem. X-Git-Tag: R_2_0_1~58 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a1fea41db002747c391ac71dd1be8bc3c3be3a3;p=libexpat Casting away some integer conversion warnings that should not pose a problem. --- diff --git a/expat/examples/elements.c b/expat/examples/elements.c index 421a1ce7..04a5399c 100644 --- a/expat/examples/elements.c +++ b/expat/examples/elements.c @@ -52,7 +52,7 @@ main(int argc, char *argv[]) XML_SetUserData(parser, &depth); XML_SetElementHandler(parser, startElement, endElement); do { - size_t len = fread(buf, 1, sizeof(buf), stdin); + int len = (int)fread(buf, 1, sizeof(buf), stdin); done = len < sizeof(buf); if (XML_Parse(parser, buf, len, done) == XML_STATUS_ERROR) { fprintf(stderr, diff --git a/expat/examples/outline.c b/expat/examples/outline.c index 807ddb89..74c019a5 100644 --- a/expat/examples/outline.c +++ b/expat/examples/outline.c @@ -86,7 +86,7 @@ main(int argc, char *argv[]) int done; int len; - len = fread(Buff, 1, BUFFSIZE, stdin); + len = (int)fread(Buff, 1, BUFFSIZE, stdin); if (ferror(stdin)) { fprintf(stderr, "Read error\n"); exit(-1);