ICU-900 Fixed some compiler warnings.

X-SVN-Rev: 8545
This commit is contained in:
George Rhoten 2002-04-30 21:03:00 +00:00
parent a07bb49fae
commit faec7727ae
4 changed files with 8 additions and 8 deletions

View File

@ -177,7 +177,7 @@ strcpy_returnEnd(char *dest, const char *src) {
char *
uprv_computeDirPath(const char *path, char *pathBuffer) {
char *finalSlash; /* Ptr to last dir separator in input path, or null if none. */
int pathLen; /* Length of the returned directory path */
int32_t pathLen; /* Length of the returned directory path */
finalSlash = 0;
if (path != 0) {
@ -200,7 +200,7 @@ uprv_computeDirPath(const char *path, char *pathBuffer) {
/* User supplied path did contain a directory portion.
* Copy it to the output path buffer */
pathLen = finalSlash - path + 1;
pathLen = (int32_t)(finalSlash - path + 1);
uprv_memcpy(pathBuffer, path, pathLen);
*(pathBuffer+pathLen) = 0;
return pathBuffer+pathLen;
@ -296,7 +296,7 @@ static UDataMemory *udata_findCachedData(const char *path)
static UDataMemory *udata_cacheDataItem(const char *path, UDataMemory *item, UErrorCode *pErr) {
DataCacheElement *newElement;
const char *baseName;
int nameLen;
int32_t nameLen;
UHashtable *htable;
UDataMemory *oldValue = NULL;
@ -319,7 +319,7 @@ static UDataMemory *udata_cacheDataItem(const char *path, UDataMemory *item, UEr
UDatamemory_assign(newElement->item, item);
baseName = findBasename(path);
nameLen = uprv_strlen(baseName);
nameLen = (int32_t)uprv_strlen(baseName);
newElement->name = uprv_malloc(nameLen+1);
if (newElement->name == NULL) {
*pErr = U_MEMORY_ALLOCATION_ERROR;

View File

@ -137,7 +137,7 @@ u_writeIdenticalLevelRun(const UChar *s, int32_t length, uint8_t *p) {
p=u_writeDiff(c-prev, p);
prev=c;
}
return p-p0;
return (int32_t)(p-p0);
}
/* How many bytes would writeIdenticalLevelRun() write? */

View File

@ -888,7 +888,7 @@ uint32_t util64_tou(int64_t w, UChar* buf, uint32_t len, uint32_t radix, UBool r
*p = 0; // null terminate if room for caller convenience
}
len = p - buf;
len = (uint32_t)(p - buf);
if (*buf == kUMinus) {
++buf;
}

View File

@ -205,10 +205,10 @@ ucol_getOffset(const UCollationElements *elems)
if (ci->fcdPosition == NULL) {
return 0;
}
return ci->fcdPosition - ci->string;
return (int32_t)(ci->fcdPosition - ci->string);
}
else {
return ci->pos - ci->string;
return (int32_t)(ci->pos - ci->string);
}
}