diff --git a/icu4c/source/test/intltest/transtst.cpp b/icu4c/source/test/intltest/transtst.cpp index 990e2cd5cf..f24ca6ea0c 100644 --- a/icu4c/source/test/intltest/transtst.cpp +++ b/icu4c/source/test/intltest/transtst.cpp @@ -222,7 +222,7 @@ void TransliteratorTest::TestRuleBasedInverse(void) { "caccb", "xyzzy", }; - int32_t DATA_length = sizeof(DATA) / sizeof(DATA[0]); + int32_t DATA_length = (int32_t)(sizeof(DATA) / sizeof(DATA[0])); UErrorCode status = U_ZERO_ERROR; RuleBasedTransliterator fwd("", RULES, status); @@ -264,7 +264,7 @@ void TransliteratorTest::TestKeyboard(void) { 0, "AycAY", // null means finishKeyboardTransliteration }; - keyboardAux(t, DATA, sizeof(DATA)/sizeof(DATA[0])); + keyboardAux(t, DATA, (int32_t)(sizeof(DATA)/sizeof(DATA[0]))); } /** @@ -296,7 +296,7 @@ void TransliteratorTest::TestKeyboard2(void) { 0, "AycAY", // null means finishKeyboardTransliteration }; - keyboardAux(t, DATA, sizeof(DATA)/sizeof(DATA[0])); + keyboardAux(t, DATA, (int32_t)(sizeof(DATA)/sizeof(DATA[0]))); } /** @@ -328,7 +328,7 @@ void TransliteratorTest::TestKeyboard3(void) { errln("FAIL: RBT constructor failed"); return; } - keyboardAux(t, DATA, sizeof(DATA)/sizeof(DATA[0])); + keyboardAux(t, DATA, (int32_t)(sizeof(DATA)/sizeof(DATA[0]))); } void TransliteratorTest::keyboardAux(const Transliterator& t, @@ -634,7 +634,7 @@ void TransliteratorTest::TestJ329(void) { { FALSE, "a > b; c > d" }, { TRUE, "a > b; no operator; c > d" }, }; - int32_t DATA_length = sizeof(DATA) / sizeof(DATA[0]); + int32_t DATA_length = (int32_t)(sizeof(DATA) / sizeof(DATA[0])); for (int32_t i=0; i", @@ -840,7 +840,7 @@ void TransliteratorTest::TestHiraganaKatakana(void) { "\\u307C\\u3051\\u3060\\u3042\\u3093\\u30FC", "\\u30DC\\u30F6\\u30C0\\u30FC\\u30F3\\u30FC", }; - int32_t DATA_length = sizeof(DATA) / sizeof(DATA[0]); + int32_t DATA_length = (int32_t)(sizeof(DATA) / sizeof(DATA[0])); for (int32_t i=0; i