offset16 = 0;
offset8 = 0;
while(currCh <= UNICODE_LIMIT
- && offset16 < (MAX_LENGTH/sizeof(UChar) - MAX_UTF16_LEN)
+ && offset16 < ((int32_t)(MAX_LENGTH/sizeof(UChar) - MAX_UTF16_LEN))
&& offset8 < (MAX_LENGTH - MAX_UTF8_LEN))
{
if (currCh == SURROGATE_HIGH_START) {
offset16 = 0;
offset32 = 0;
while(currCh <= UNICODE_LIMIT
- && offset16 < (MAX_LENGTH/sizeof(UChar) - MAX_UTF16_LEN)
- && offset32 < (MAX_LENGTH/sizeof(UChar32) - MAX_UTF32_LEN))
+ && offset16 < ((int32_t)(MAX_LENGTH/sizeof(UChar) - MAX_UTF16_LEN))
+ && offset32 < ((int32_t)(MAX_LENGTH/sizeof(UChar32) - MAX_UTF32_LEN)))
{
if (currCh == SURROGATE_HIGH_START) {
currCh = SURROGATE_LOW_END + 1; /* Skip surrogate range */
if(!testConvertToU(sampleText1, sizeof(sampleText1),
expected1, UPRV_LENGTHOF(expected1),"utf8", UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets1,FALSE))
- log_err("utf8->u with substitute did not match.\n");;
+ log_err("utf8->u with substitute did not match.\n");
}
#if !UCONFIG_NO_LEGACY_CONVERSION