From 0656b374125db8a7e0b2b5b0acbe2b1d61ec1edb Mon Sep 17 00:00:00 2001 From: Madhu K Date: Mon, 14 Aug 2000 17:47:43 +0000 Subject: [PATCH] ICU-535 Removed compiler warnings X-SVN-Rev: 2223 --- icu4c/source/test/cintltst/cfrtst.c | 2 +- icu4c/source/test/cintltst/encoll.c | 4 ++-- icu4c/source/test/cintltst/ncnvtst.c | 4 ++-- icu4c/source/test/cintltst/nucnvtst.c | 4 ++-- icu4c/source/test/cintltst/ucmptst.c | 10 +++++----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/icu4c/source/test/cintltst/cfrtst.c b/icu4c/source/test/cintltst/cfrtst.c index b03a16fbd92..c83dbb22166 100644 --- a/icu4c/source/test/cintltst/cfrtst.c +++ b/icu4c/source/test/cintltst/cfrtst.c @@ -187,7 +187,7 @@ void TestTertiary( ) void TestSecondary() { int32_t i,j, testAcuteSize; - UCollationResult expected; + UCollationResult expected=UCOL_EQUAL; UErrorCode status = U_ZERO_ERROR; myCollation = ucol_open("fr_FR", &status); if(U_FAILURE(status)){ diff --git a/icu4c/source/test/cintltst/encoll.c b/icu4c/source/test/cintltst/encoll.c index 901156a9fcd..82258259147 100644 --- a/icu4c/source/test/cintltst/encoll.c +++ b/icu4c/source/test/cintltst/encoll.c @@ -287,7 +287,7 @@ void doTest(UCollator* myCollation, const UChar source[], const UChar target[], void TestTertiary( ) { int32_t testMoreSize; - UCollationResult expected; + UCollationResult expected=UCOL_EQUAL; int32_t i,j; UErrorCode status = U_ZERO_ERROR; myCollation = ucol_open("en_US", &status); @@ -347,7 +347,7 @@ void TestPrimary() void TestSecondary() { - UCollationResult expected; + UCollationResult expected=UCOL_EQUAL; int32_t i,j, testAcuteSize; UErrorCode status = U_ZERO_ERROR; myCollation = ucol_open("en_US", &status); diff --git a/icu4c/source/test/cintltst/ncnvtst.c b/icu4c/source/test/cintltst/ncnvtst.c index aaace4685f7..47846e83ca6 100644 --- a/icu4c/source/test/cintltst/ncnvtst.c +++ b/icu4c/source/test/cintltst/ncnvtst.c @@ -340,10 +340,10 @@ void TestToUnicodeErrorBehaviour() const UChar expected2[] = { 0x0073 };*/ if(!convertToU(sampleText, sizeof(sampleText), - (const char*)expected, sizeof(expected)/sizeof(expected[0]), "ibm-1051", 0, TRUE, U_ZERO_ERROR )) + expected, sizeof(expected)/sizeof(expected[0]), "ibm-1051", 0, TRUE, U_ZERO_ERROR )) log_err("SBCS (ibm-1051)->Unicode did not match.\n"); if(!convertToU(sampleText, sizeof(sampleText), - (const char*)expected, sizeof(expected)/sizeof(expected[0]), "ibm-1051", 0, FALSE, U_ZERO_ERROR )) + expected, sizeof(expected)/sizeof(expected[0]), "ibm-1051", 0, FALSE, U_ZERO_ERROR )) log_err("SBCS (ibm-1051)->Unicode with flush = false did not match.\n"); } diff --git a/icu4c/source/test/cintltst/nucnvtst.c b/icu4c/source/test/cintltst/nucnvtst.c index d65774b9afb..3fddb29949a 100644 --- a/icu4c/source/test/cintltst/nucnvtst.c +++ b/icu4c/source/test/cintltst/nucnvtst.c @@ -1273,8 +1273,8 @@ TestEBCDIC_STATEFUL() { TestNextUCharError(cnv, (const char*)source2, (const char*)source2+sizeof(source2), U_ZERO_ERROR, "an invalid character [EBCDIC STATEFUL]"); } ucnv_reset(cnv); - source=in2; - limit=in2+sizeof(in2); + source=(const char*)in2; + limit=(const char*)in2+sizeof(in2); TestNextUChar(cnv,source,limit,results2,"EBCDIC_STATEFUL(ibm-930),seq#2"); ucnv_close(cnv); diff --git a/icu4c/source/test/cintltst/ucmptst.c b/icu4c/source/test/cintltst/ucmptst.c index 2556f27995e..54c347fe836 100644 --- a/icu4c/source/test/cintltst/ucmptst.c +++ b/icu4c/source/test/cintltst/ucmptst.c @@ -39,7 +39,7 @@ addCompactArrayTest(TestNode** root) } void TestUCMP16API(){ - uint16_t newValues[]={ + int16_t newValues[]={ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00, 0x01, 0x02, 0x03, 0x04, @@ -55,7 +55,7 @@ void TestUCMP16API(){ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, }; - int16_t indexArray[]={ + uint16_t indexArray[]={ 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, }; @@ -242,7 +242,7 @@ void TestUCMP8API(){ log_err("Error: ucmp8_compact failed\n"); } /*ucmp8_set*/ - ucmp8_set(ucmp8Array1, 0, (char)0xFE); + ucmp8_set(ucmp8Array1, 0, (uint8_t)0xFE); valuesSet=(uint8_t*)ucmp8_getArray(ucmp8Array1); if(valuesSet[0] != (uint8_t)0xFE ){ log_err("ERROR: ucmp8_set() failed\n"); @@ -253,7 +253,7 @@ void TestUCMP8API(){ /*ucmp8_set*/ ucmp8_compact(ucmp8Array1, 1); - ucmp8_set(ucmp8Array1, 0, (char)0xFD); + ucmp8_set(ucmp8Array1, 0, (uint8_t)0xFD); valuesSet=(uint8_t*)ucmp8_getArray(ucmp8Array1); if(valuesSet[0] != (uint8_t)0xFD ){ log_err("ERROR: ucmp8_set() failed\n"); @@ -263,7 +263,7 @@ void TestUCMP8API(){ } /*ucmp8_setRange*/ ucmp8_compact(ucmp8Array1, 1); - ucmp8_setRange(ucmp8Array1, 0, 10, (char)0xFD); + ucmp8_setRange(ucmp8Array1, 0, 10, (uint8_t)0xFD); valuesSet=(uint8_t*)ucmp8_getArray(ucmp8Array1); for(i =0 ; i< 10; i++ ){ if(valuesSet[0] != (uint8_t)0xFD ){