diff --git a/icu4c/source/i18n/dbbi.cpp b/icu4c/source/i18n/dbbi.cpp index b8ca3207ca..9330e15d98 100644 --- a/icu4c/source/i18n/dbbi.cpp +++ b/icu4c/source/i18n/dbbi.cpp @@ -274,18 +274,18 @@ BreakIterator * DictionaryBasedBreakIterator::createBufferClone(void *stackBuff } if (text == NULL) { - bufferSizeNeeded = sizeof(DictionaryBasedBreakIterator); + bufferSizeNeeded = (int32_t) sizeof(DictionaryBasedBreakIterator); IterIsString = IterIsUChar = FALSE; } else if (text->getDynamicClassID() == StringCharacterIterator::getStaticClassID()) { - bufferSizeNeeded = sizeof(struct bufferCloneStructString); + bufferSizeNeeded = (int32_t) sizeof(struct bufferCloneStructString); IterIsString = TRUE; IterIsUChar = FALSE; } else if (text->getDynamicClassID() == UCharCharacterIterator::getStaticClassID()) { - bufferSizeNeeded = sizeof(struct bufferCloneStructUChar); + bufferSizeNeeded = (int32_t) sizeof(struct bufferCloneStructUChar); IterIsString = FALSE; IterIsUChar = TRUE; } diff --git a/icu4c/source/i18n/rbbi.cpp b/icu4c/source/i18n/rbbi.cpp index a0208dd72b..65501a019e 100644 --- a/icu4c/source/i18n/rbbi.cpp +++ b/icu4c/source/i18n/rbbi.cpp @@ -593,18 +593,18 @@ BreakIterator * RuleBasedBreakIterator::createBufferClone(void *stackBuffer, } if (text == NULL) { - bufferSizeNeeded = sizeof(RuleBasedBreakIterator); + bufferSizeNeeded = (int32_t) sizeof(RuleBasedBreakIterator); IterIsString = IterIsUChar = FALSE; } else if (text->getDynamicClassID() == StringCharacterIterator::getStaticClassID()) { - bufferSizeNeeded = sizeof(struct bufferCloneStructString); + bufferSizeNeeded = (int32_t) sizeof(struct bufferCloneStructString); IterIsString = TRUE; IterIsUChar = FALSE; } else if (text->getDynamicClassID() == UCharCharacterIterator::getStaticClassID()) { - bufferSizeNeeded = sizeof(struct bufferCloneStructUChar); + bufferSizeNeeded = (int32_t) sizeof(struct bufferCloneStructUChar); IterIsString = FALSE; IterIsUChar = TRUE; }