ICU-4707 Fix some compiler warnings.

X-SVN-Rev: 19417
This commit is contained in:
George Rhoten 2006-03-23 05:53:36 +00:00
parent 240c50c633
commit b51bdf2a60
3 changed files with 14 additions and 12 deletions

View File

@ -1,6 +1,6 @@
/*
**********************************************************************
* Copyright (C) 2002-2005, International Business Machines
* Copyright (C) 2002-2006, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: ucnv_u16.c
@ -40,7 +40,7 @@ _UTF16BEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
const UChar *source;
uint8_t *target;
char *target;
int32_t *offsets;
int32_t targetCapacity, length, sourceIndex;
@ -73,7 +73,7 @@ _UTF16BEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
return;
}
target=(uint8_t *)pArgs->target;
target=pArgs->target;
offsets=pArgs->offsets;
sourceIndex=0;
@ -594,7 +594,7 @@ _UTF16LEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
UErrorCode *pErrorCode) {
UConverter *cnv;
const UChar *source;
uint8_t *target;
char *target;
int32_t *offsets;
int32_t targetCapacity, length, sourceIndex;
@ -627,7 +627,7 @@ _UTF16LEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
return;
}
target=(uint8_t *)pArgs->target;
target=pArgs->target;
offsets=pArgs->offsets;
sourceIndex=0;
@ -777,7 +777,7 @@ _UTF16LEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
/* output length bytes with overflow (length>targetCapacity>0) */
ucnv_fromUWriteBytes(cnv,
overflow, length,
(char **)&target, pArgs->targetLimit,
&target, pArgs->targetLimit,
&offsets, sourceIndex,
pErrorCode);
targetCapacity=(int32_t)(pArgs->targetLimit-(char *)target);
@ -789,7 +789,7 @@ _UTF16LEFromUnicodeWithOffsets(UConverterFromUnicodeArgs *pArgs,
/* write back the updated pointers */
pArgs->source=source;
pArgs->target=(char *)target;
pArgs->target=target;
pArgs->offsets=offsets;
}

View File

@ -1,6 +1,6 @@
/********************************************************************
* COPYRIGHT:
* Copyright (c) 1997-2005, International Business Machines Corporation and
* Copyright (c) 1997-2006, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
@ -1170,8 +1170,8 @@ static void TestCoverage(void){
for(i = 0; i < ULOCDATA_DELIMITER_COUNT; i++){
UErrorCode status = U_ZERO_ERROR;
UChar result[32] = {0,};
status = U_ZERO_ERROR;
ulocdata_getDelimiter(uld, types[i], result, 32, &status);
if (U_FAILURE(status)){
log_err("ulocdata_getgetDelimiter error with type %d", types[i]);

View File

@ -1,6 +1,6 @@
/********************************************************************
* COPYRIGHT:
* Copyright (c) 1997-2005, International Business Machines Corporation and
* Copyright (c) 1997-2006, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/********************************************************************************
@ -44,7 +44,7 @@ void addNumForTest(TestNode** root)
TESTCASE(TestNumberFormatPadding);
TESTCASE(TestInt64Format);
TESTCASE(TestNonExistentCurrency);
/*TESTCASE(TestCurrencyRegression);*/
TESTCASE(TestCurrencyRegression);
TESTCASE(TestRBNFFormat);
}
@ -1287,7 +1287,8 @@ static void TestRBNFFormat() {
}
}
static void TestCurrencyRegression() {
static void TestCurrencyRegression(void) {
#if U_ICU_VERSION_MAJOR_NUM > 3 || U_ICU_VERSION_MINOR_NUM > 5
/*
I've found a case where unum_parseDoubleCurrency is not doing what I
expect. The value I pass in is $1234567890q123460000.00 and this
@ -1342,6 +1343,7 @@ their data!
}
unum_close(cur);
#endif
}
#endif /* #if !UCONFIG_NO_FORMATTING */