ICU-2000 Fixed some compiler warnings.

X-SVN-Rev: 9902
This commit is contained in:
George Rhoten 2002-09-20 17:44:40 +00:00
parent c4f6ebe78e
commit 2a19dd8701
2 changed files with 6 additions and 6 deletions

View file

@ -53,8 +53,8 @@ static const char CURRENCIES[] = "Currencies";
* to use it as a resource key.
*/
static inline char*
_16to8(char* resultOfLen4, const UChar* currency) {
u_austrncpy(resultOfLen4, currency, 3);
myUCharsToChars(char* resultOfLen4, const UChar* currency) {
u_UCharsToChars(currency, resultOfLen4, 3);
resultOfLen4[3] = 0;
return resultOfLen4;
}
@ -82,7 +82,7 @@ _findData(const UChar* currency) {
// Look up our currency, or if that's not available, then DEFAULT
char buf[4];
ResourceBundle rb = currencyMeta.get(_16to8(buf, currency), ec);
ResourceBundle rb = currencyMeta.get(myUCharsToChars(buf, currency), ec);
if (U_FAILURE(ec)) {
rb = currencyMeta.get(DEFAULT_META, ec);
if (U_FAILURE(ec)) {
@ -156,7 +156,7 @@ ucurr_getSymbol(const UChar* currency,
char buf[4];
UResourceBundle* rb = ures_open(NULL, locale, ec);
UResourceBundle* rb_c = ures_getByKey(rb, CURRENCIES, NULL, ec);
s = ures_getStringByKey(rb_c, _16to8(buf, currency), len, ec);
s = ures_getStringByKey(rb_c, myUCharsToChars(buf, currency), len, ec);
ures_close(rb_c);
UBool found = U_SUCCESS(*ec);

View file

@ -2031,12 +2031,12 @@ testSwap(const char *name, UBool swap) {
/* convert back to Unicode (may not roundtrip) */
pc=normal;
pu=uNormal;
ucnv_toUnicode(cnv, &pu, uNormal+LENGTHOF(uNormal), &pc, normal+normalLength, NULL, TRUE, &errorCode);
ucnv_toUnicode(cnv, &pu, uNormal+LENGTHOF(uNormal), (const char **)&pc, normal+normalLength, NULL, TRUE, &errorCode);
normalLength=(int32_t)(pu-uNormal);
pc=normal;
pu=uSwapped;
ucnv_toUnicode(swapCnv, &pu, uSwapped+LENGTHOF(uSwapped), &pc, normal+swappedLength, NULL, TRUE, &errorCode);
ucnv_toUnicode(swapCnv, &pu, uSwapped+LENGTHOF(uSwapped), (const char **)&pc, normal+swappedLength, NULL, TRUE, &errorCode);
swappedLength=(int32_t)(pu-uSwapped);
if(U_FAILURE(errorCode)) {