diff --git a/icu4c/source/common/ucnv_bld.c b/icu4c/source/common/ucnv_bld.c index cef35198c99..861a57e8043 100644 --- a/icu4c/source/common/ucnv_bld.c +++ b/icu4c/source/common/ucnv_bld.c @@ -529,7 +529,6 @@ ucnv_createConverter(UConverter *myUConverter, const char *converterName, UError UConverterSharedData *mySharedConverterData = NULL; UErrorCode internalErrorCode = U_ZERO_ERROR; uint32_t options = 0; - int32_t cnvNumber = -1; if (U_FAILURE (*err)) return NULL; @@ -552,7 +551,7 @@ ucnv_createConverter(UConverter *myUConverter, const char *converterName, UError } /* get the canonical converter name */ - realName = ucnv_io_getConverterName(cnvName, &cnvNumber, &internalErrorCode); + realName = ucnv_io_getConverterName(cnvName, &internalErrorCode); if (U_FAILURE(internalErrorCode) || realName == NULL) { /* * set the input name in case the converter was added diff --git a/icu4c/source/common/ucnv_io.c b/icu4c/source/common/ucnv_io.c index 1d0a582a114..b669e3c5a82 100644 --- a/icu4c/source/common/ucnv_io.c +++ b/icu4c/source/common/ucnv_io.c @@ -574,20 +574,14 @@ findTaggedConverterNum(const char *alias, const char *standard, UErrorCode *pErr U_CFUNC const char * -ucnv_io_getConverterName(const char *alias, int32_t *convNumPtr, UErrorCode *pErrorCode) { +ucnv_io_getConverterName(const char *alias, UErrorCode *pErrorCode) { if(haveAliasData(pErrorCode) && isAlias(alias, pErrorCode)) { uint32_t convNum = findConverter(alias, pErrorCode); if (convNum < gConverterListSize) { - if (convNumPtr) { - *convNumPtr = (int32_t)convNum; - } return GET_STRING(gConverterList[convNum]); } /* else converter not found */ } - if (convNumPtr) { - *convNumPtr = -1; - } return NULL; } @@ -1024,7 +1018,7 @@ ucnv_io_setDefaultConverterName(const char *converterName) { gDefaultConverterName=NULL; } else { UErrorCode errorCode=U_ZERO_ERROR; - const char *name=ucnv_io_getConverterName(converterName, NULL, &errorCode); + const char *name=ucnv_io_getConverterName(converterName, &errorCode); if(U_SUCCESS(errorCode) && name!=NULL) { gDefaultConverterName=name; } else { diff --git a/icu4c/source/common/ucnv_io.h b/icu4c/source/common/ucnv_io.h index 5bb471e7219..a236f5b0a0a 100644 --- a/icu4c/source/common/ucnv_io.h +++ b/icu4c/source/common/ucnv_io.h @@ -36,12 +36,11 @@ ucnv_io_stripForCompare(char *dst, const char *name); * is returned in mixed-case. * Returns NULL if the alias is not found. * @param alias The alias name to be searched. - * @param convNumPtr aAn out param for the index of the converter name in the alias table. * @param pErrorCode The error code * @return the converter name in mixed-case, return NULL if the alias is not found. */ U_CFUNC const char * -ucnv_io_getConverterName(const char *alias, int32_t *convNumPtr, UErrorCode *pErrorCode); +ucnv_io_getConverterName(const char *alias, UErrorCode *pErrorCode); /** * The count for ucnv_io_getAliases and ucnv_io_getAlias