ICU-900 Fixed some compiler warnings.
X-SVN-Rev: 8696
This commit is contained in:
parent
c44455d477
commit
6fe1129757
@ -242,7 +242,7 @@ static void TestReorder(){
|
||||
UBiDi* bidi = ubidi_open();
|
||||
int i=0;
|
||||
for(;i<(sizeof(logicalOrder)/sizeof(logicalOrder[0]));i++){
|
||||
int32_t srcSize = uprv_strlen(logicalOrder[i]);
|
||||
int32_t srcSize = (int32_t)uprv_strlen(logicalOrder[i]);
|
||||
int32_t destSize = srcSize*2;
|
||||
UChar* src = (UChar*) uprv_malloc(sizeof(UChar)*srcSize );
|
||||
UChar* dest = (UChar*) uprv_malloc(sizeof(UChar)*destSize);
|
||||
@ -278,7 +278,7 @@ static void TestReorder(){
|
||||
}
|
||||
|
||||
for(i=0;i<(sizeof(logicalOrder)/sizeof(logicalOrder[0]));i++){
|
||||
int32_t srcSize = uprv_strlen(logicalOrder[i]);
|
||||
int32_t srcSize = (int32_t)uprv_strlen(logicalOrder[i]);
|
||||
int32_t destSize = srcSize*2;
|
||||
UChar* src = (UChar*) uprv_malloc(sizeof(UChar)*srcSize );
|
||||
UChar* dest = (UChar*) uprv_malloc(sizeof(UChar)*destSize);
|
||||
@ -315,7 +315,7 @@ static void TestReorder(){
|
||||
}
|
||||
|
||||
for(i=0;i<(sizeof(logicalOrder)/sizeof(logicalOrder[0]));i++){
|
||||
int32_t srcSize = uprv_strlen(logicalOrder[i]);
|
||||
int32_t srcSize = (int32_t)uprv_strlen(logicalOrder[i]);
|
||||
int32_t destSize = srcSize*2;
|
||||
UChar* src = (UChar*) uprv_malloc(sizeof(UChar)*srcSize );
|
||||
UChar* dest = (UChar*) uprv_malloc(sizeof(UChar)*destSize);
|
||||
@ -354,7 +354,7 @@ static void TestReorder(){
|
||||
}
|
||||
/* Max Explicit level */
|
||||
for(i=0;i<(sizeof(logicalOrder)/sizeof(logicalOrder[0]));i++){
|
||||
int32_t srcSize = uprv_strlen(logicalOrder[i]);
|
||||
int32_t srcSize = (int32_t)uprv_strlen(logicalOrder[i]);
|
||||
int32_t destSize = srcSize*2;
|
||||
UChar* src = (UChar*) uprv_malloc(sizeof(UChar)*srcSize );
|
||||
UChar* dest = (UChar*) uprv_malloc(sizeof(UChar)*destSize);
|
||||
@ -392,7 +392,7 @@ static void TestReorder(){
|
||||
uprv_free(dest);
|
||||
}
|
||||
for(i=0;i<(sizeof(logicalOrder)/sizeof(logicalOrder[0]));i++){
|
||||
int32_t srcSize = uprv_strlen(logicalOrder[i]);
|
||||
int32_t srcSize = (int32_t)uprv_strlen(logicalOrder[i]);
|
||||
int32_t destSize = srcSize*2;
|
||||
UChar* src = (UChar*) uprv_malloc(sizeof(UChar)*srcSize );
|
||||
UChar* dest = (UChar*) uprv_malloc(sizeof(UChar)*destSize);
|
||||
|
@ -1473,7 +1473,7 @@ static void TestDiscontiguos() {
|
||||
if (e == 0) {
|
||||
e = u_strchr(s, 0);
|
||||
}
|
||||
ucol_setText(resultiter, s, e - s, &status);
|
||||
ucol_setText(resultiter, s, (int32_t)(e - s), &status);
|
||||
ce = ucol_next(resultiter, &status);
|
||||
if (U_FAILURE(status)) {
|
||||
log_err("Error manipulating collation iterator\n");
|
||||
|
@ -934,7 +934,7 @@ static void OpenMessageFormatTest(void)
|
||||
|
||||
/* Test umsg_applyPattern */
|
||||
status = U_ZERO_ERROR;
|
||||
umsg_applyPattern(f1,pattern,strlen(PAT),NULL,&status);
|
||||
umsg_applyPattern(f1,pattern,(int32_t)strlen(PAT),NULL,&status);
|
||||
if(U_FAILURE(status))
|
||||
{
|
||||
log_err("umsg_applyPattern failed. Error %s \n",u_errorName(status));
|
||||
|
@ -479,7 +479,7 @@ static void TestCurrencyPreEuro(void)
|
||||
log_err("Error in formatting using unum_formatDouble(.....): %s\n", myErrorName(status) );
|
||||
}
|
||||
res=(UChar*)uprv_malloc(sizeof(UChar) * (strlen(result[i])+1) );
|
||||
u_unescape(result[i],res,strlen(result[i])+1);
|
||||
u_unescape(result[i],res,(int32_t)(strlen(result[i])+1));
|
||||
u_UCharsToChars(str,cStr,u_strlen(str));
|
||||
if (u_strcmp(str, res) != 0){
|
||||
log_err("FAIL: Expected %s Got: %s for locale: %s\n", result[i],cStr,locale[i]);
|
||||
@ -560,7 +560,7 @@ static void TestCurrencyObject(void)
|
||||
log_err("Error in formatting using unum_formatDouble(.....): %s\n", myErrorName(status) );
|
||||
}
|
||||
res=(UChar*)uprv_malloc(sizeof(UChar) * (strlen(result[i])+1) );
|
||||
u_unescape(result[i],res,strlen(result[i])+1);
|
||||
u_unescape(result[i],res, (int32_t)(strlen(result[i])+1));
|
||||
u_UCharsToChars(str,cStr,u_strlen(str));
|
||||
if (u_strcmp(str, res) != 0){
|
||||
log_err("FAIL: Expected %s Got: %s for locale: %s\n", result[i],cStr,locale[i]);
|
||||
|
@ -45,8 +45,10 @@ static int32_t ustrToAstr(const UChar* src, int32_t srcLength, char* dst, int32_
|
||||
const char *e = p + dstLength;
|
||||
if (srcLength < 0) {
|
||||
const UChar* s = src;
|
||||
while (*s) ++s;
|
||||
srcLength = s - src;
|
||||
while (*s) {
|
||||
++s;
|
||||
}
|
||||
srcLength = (int32_t)(s - src);
|
||||
}
|
||||
while (p < e && --srcLength >= 0) {
|
||||
UChar c = *src++;
|
||||
@ -66,7 +68,7 @@ static int32_t ustrToAstr(const UChar* src, int32_t srcLength, char* dst, int32_
|
||||
if (p < e) {
|
||||
*p = 0;
|
||||
}
|
||||
return p - dst;
|
||||
return (int32_t)(p - dst);
|
||||
}
|
||||
|
||||
/* test Number Format API */
|
||||
|
Loading…
Reference in New Issue
Block a user