From 040a460a82cd719d911f88e42a96b456b7149fca Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Fri, 11 Aug 2000 19:45:02 +0000 Subject: [PATCH] ICU-535 fixed some compiler warnings X-SVN-Rev: 2201 --- icu4c/source/test/cintltst/stdnmtst.c | 8 ++++---- icu4c/source/tools/gencnval/gencnval.c | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/icu4c/source/test/cintltst/stdnmtst.c b/icu4c/source/test/cintltst/stdnmtst.c index 348c7589f9..ed21da888c 100644 --- a/icu4c/source/test/cintltst/stdnmtst.c +++ b/icu4c/source/test/cintltst/stdnmtst.c @@ -39,10 +39,10 @@ static int dotestname(const char *name, const char *standard, const char *expect tag = ucnv_getStandardName(name, standard, &error); if (!tag) { log_err("FAIL: could not find %s standard name for %s\n", standard, name); - res = 0; + res = 0; } else if (expected && uprv_strcmp(expected, tag)) { log_err("FAIL: expected %s for %s standard name for %s, got %s\n", expected, standard, name, tag); - res = 0; + res = 0; } return res; @@ -52,11 +52,11 @@ void TestStandardNames() { int res = 1; - int i, count; + uint16_t i, count; UErrorCode err; /* Iterate over all standards. */ - + for (i = 0, count = ucnv_countStandards(); i < count; ++i) { const char *std; diff --git a/icu4c/source/tools/gencnval/gencnval.c b/icu4c/source/tools/gencnval/gencnval.c index cf7372aa04..43dc5f29ab 100644 --- a/icu4c/source/tools/gencnval/gencnval.c +++ b/icu4c/source/tools/gencnval/gencnval.c @@ -216,7 +216,7 @@ main(int argc, const char *argv[]) { /* determine the length of tables for the data offset of the strings */ tagOffset = 2 + 4 * aliasCount + 2 + 4 * converterCount; - stringOffset = tagOffset + 2 + (2 * tagCount) * converterCount + tagBlock.top; + stringOffset = (uint16_t)(tagOffset + 2 + (2 * tagCount) * converterCount + tagBlock.top); /* write the table of aliases */ udata_write16(out, aliasCount); @@ -314,15 +314,15 @@ parseLine(const char *line) { ++pos; } limit = pos; - + if (start != limit) { uint16_t tag; - + /* add the tag to the tag table */ - tag = getTagNumber(line + start, limit - start); + tag = getTagNumber(line + start, (uint16_t)(limit - start)); addTaggedAlias(tag, alias, cnv); } - + while (line[pos] && isspace((unsigned char)line[pos])) { ++pos; } @@ -383,7 +383,7 @@ parseLine(const char *line) { uint16_t tag; /* add the tag to the tag table */ - tag = getTagNumber(line + start, limit - start); + tag = getTagNumber(line + start, (uint16_t)(limit - start)); addTaggedAlias(tag, alias, cnv); }