From a47dc395b7d7adb690a181ec4e00db3dd58b4b31 Mon Sep 17 00:00:00 2001 From: Ram Viswanadha Date: Mon, 27 Nov 2000 17:40:41 +0000 Subject: [PATCH] ICU-535 Fixed compiler warnings X-SVN-Rev: 3006 --- icu4c/source/common/ucnv2022.c | 4 ++-- icu4c/source/common/ucnv_cnv.h | 2 +- icu4c/source/common/ucnv_utf.c | 5 +++++ icu4c/source/common/ucnvebdc.c | 1 + icu4c/source/common/ucnvhz.c | 1 + icu4c/source/common/ucnvlat1.c | 1 + icu4c/source/common/ucnvmbcs.c | 3 ++- icu4c/source/common/ucnvsbcs.c | 2 ++ 8 files changed, 15 insertions(+), 4 deletions(-) diff --git a/icu4c/source/common/ucnv2022.c b/icu4c/source/common/ucnv2022.c index bf059d20be2..747055bad0d 100644 --- a/icu4c/source/common/ucnv2022.c +++ b/icu4c/source/common/ucnv2022.c @@ -343,7 +343,7 @@ UCNV_TableStates_2022 getKey_2022(char source, static void _ISO2022Open(UConverter *cnv, const char *name, const char *locale,uint32_t* version, UErrorCode *errorCode); static void _ISO2022Close(UConverter *converter); static void _ISO2022Reset(UConverter *converter); -static const char* _ISO2022getName(UConverter* cnv); +static const char* _ISO2022getName(const UConverter* cnv); /************ protos of functions for setting the initial state *********************/ static void setInitialStateToUnicodeJPCN(UConverter* converter,UConverterDataISO2022 *myConverterData); @@ -680,7 +680,7 @@ _ISO2022Reset(UConverter *converter) { } } -static const char* _ISO2022getName(UConverter* cnv){ +static const char* _ISO2022getName(const UConverter* cnv){ if(cnv->extraInfo){ UConverterDataISO2022* myData= (UConverterDataISO2022*)cnv->extraInfo; return myData->name; diff --git a/icu4c/source/common/ucnv_cnv.h b/icu4c/source/common/ucnv_cnv.h index 5eccc1d6df2..86be7b6ae6f 100644 --- a/icu4c/source/common/ucnv_cnv.h +++ b/icu4c/source/common/ucnv_cnv.h @@ -155,7 +155,7 @@ typedef void (*UConverterGetStarters)(const UConverter* converter, * the name field in static data struct should be returned by * ucnv_getName() API function */ -typedef const char * (*UConverterGetName) (UConverter *cnv); +typedef const char * (*UConverterGetName) (const UConverter *cnv); UBool CONVERSION_U_SUCCESS (UErrorCode err); diff --git a/icu4c/source/common/ucnv_utf.c b/icu4c/source/common/ucnv_utf.c index eff1326ee7d..738d0d7936f 100644 --- a/icu4c/source/common/ucnv_utf.c +++ b/icu4c/source/common/ucnv_utf.c @@ -775,6 +775,7 @@ static const UConverterImpl _UTF8Impl={ T_UConverter_fromUnicode_UTF8_OFFSETS_LOGIC, T_UConverter_getNextUChar_UTF8, + NULL, NULL }; @@ -954,6 +955,7 @@ static const UConverterImpl _UTF16BEImpl={ NULL, T_UConverter_getNextUChar_UTF16_BE, + NULL, NULL }; @@ -1142,6 +1144,7 @@ static const UConverterImpl _UTF16LEImpl={ NULL, T_UConverter_getNextUChar_UTF16_LE, + NULL, NULL }; @@ -1368,6 +1371,7 @@ static const UConverterImpl _UTF32BEImpl = { /* T_UConverter_fromUnicode_UTF32_BE_OFFSETS_LOGIC, */ T_UConverter_getNextUChar_UTF32_BE, + NULL, NULL }; @@ -1594,6 +1598,7 @@ static const UConverterImpl _UTF32LEImpl = { /* T_UConverter_fromUnicode_UTF32_LE_OFFSETS_LOGIC, */ T_UConverter_getNextUChar_UTF32_LE, + NULL, NULL }; diff --git a/icu4c/source/common/ucnvebdc.c b/icu4c/source/common/ucnvebdc.c index d74ce7d2834..51e037af040 100644 --- a/icu4c/source/common/ucnvebdc.c +++ b/icu4c/source/common/ucnvebdc.c @@ -670,6 +670,7 @@ static const UConverterImpl _EBCDICStatefulImpl={ T_UConverter_fromUnicode_EBCDIC_STATEFUL_OFFSETS_LOGIC, T_UConverter_getNextUChar_EBCDIC_STATEFUL, + NULL, NULL }; diff --git a/icu4c/source/common/ucnvhz.c b/icu4c/source/common/ucnvhz.c index 72db0487157..a231652d1a2 100644 --- a/icu4c/source/common/ucnvhz.c +++ b/icu4c/source/common/ucnvhz.c @@ -79,6 +79,7 @@ static UConverterImpl _HZImpl={ UConverter_fromUnicode_HZ_OFFSETS_LOGIC, UConverter_getNextUChar_HZ, + NULL, NULL }; diff --git a/icu4c/source/common/ucnvlat1.c b/icu4c/source/common/ucnvlat1.c index b136ff32e18..90d754114b6 100644 --- a/icu4c/source/common/ucnvlat1.c +++ b/icu4c/source/common/ucnvlat1.c @@ -190,6 +190,7 @@ static const UConverterImpl _Latin1Impl={ NULL, T_UConverter_getNextUChar_LATIN_1, + NULL, NULL }; diff --git a/icu4c/source/common/ucnvmbcs.c b/icu4c/source/common/ucnvmbcs.c index 877bb2820ae..fc23cdc314b 100644 --- a/icu4c/source/common/ucnvmbcs.c +++ b/icu4c/source/common/ucnvmbcs.c @@ -2013,7 +2013,8 @@ static const UConverterImpl _MBCSImpl={ _MBCSFromUnicodeWithOffsets, _MBCSGetNextUChar, - _MBCSGetStarters + _MBCSGetStarters, + NULL }; diff --git a/icu4c/source/common/ucnvsbcs.c b/icu4c/source/common/ucnvsbcs.c index eb28fb23374..63e722bfbf1 100644 --- a/icu4c/source/common/ucnvsbcs.c +++ b/icu4c/source/common/ucnvsbcs.c @@ -354,6 +354,7 @@ static const UConverterImpl _SBCSImpl={ NULL, T_UConverter_getNextUChar_SBCS, + NULL, NULL }; @@ -764,6 +765,7 @@ static const UConverterImpl _DBCSImpl={ NULL, T_UConverter_getNextUChar_DBCS, + NULL, NULL };