ICU-3905 Fix some compiler warnings

X-SVN-Rev: 16775
This commit is contained in:
George Rhoten 2004-11-05 19:07:34 +00:00
parent f3a2162e65
commit e312467f5d
3 changed files with 6 additions and 6 deletions

View file

@ -206,7 +206,7 @@ struct CReg : public UMemory {
CReg(const UChar* _iso, const char* _id)
: next(0)
{
int32_t len = uprv_strlen(_id);
int32_t len = (int32_t)uprv_strlen(_id);
if (len > (int32_t)(sizeof(id)-1)) {
len = (sizeof(id)-1);
}
@ -411,7 +411,7 @@ static UBool fallback(char *loc) {
return FALSE;
}
UErrorCode status = U_ZERO_ERROR;
uloc_getParent(loc, loc, uprv_strlen(loc), &status);
uloc_getParent(loc, loc, (int32_t)uprv_strlen(loc), &status);
/*
char *i = uprv_strrchr(loc, '_');
if (i == NULL) {

View file

@ -1050,7 +1050,7 @@ uregex_split( URegularExpression *regexp,
// No fields are left. Recycle the last one for holding the trailing part of
// the input string.
i = destFieldsCapacity-1;
destIdx = destFields[i] - destFields[0];
destIdx = (int32_t)(destFields[i] - destFields[0]);
}
destFields[i] = &destBuf[destIdx];

View file

@ -416,7 +416,7 @@ static void TestfgetsBuffers(void) {
UChar expectedBuffer[2048];
static const char testStr[] = "This is a test string that tests u_fgets. It makes sure that we don't try to read too much!";
UFILE *myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "UTF-16");
int32_t expectedSize = strlen(testStr);
int32_t expectedSize = (int32_t)strlen(testStr);
int32_t readSize;
int32_t repetitions;
@ -569,7 +569,7 @@ static void TestfgetsLineCount(void) {
static const char testStr[] = "This is a test string that tests u_fgets. It makes sure that we don't try to read too much!";
UFILE *myFile = NULL;
FILE *stdFile = fopen(STANDARD_TEST_FILE, "w");
int32_t expectedSize = strlen(testStr);
int32_t expectedSize = (int32_t)strlen(testStr);
int32_t repetitions;
int32_t nlRepetitions;
@ -606,7 +606,7 @@ static void TestfgetsLineCount(void) {
log_err("Didn't get the charBuffer back\n");
continue;
}
u_uastrncpy(expectedBuffer, charBuffer, strlen(charBuffer)+1);
u_uastrncpy(expectedBuffer, charBuffer, (int32_t)strlen(charBuffer)+1);
if (returnedUCharBuffer != buffer) {
log_err("Didn't get the buffer back\n");
continue;