Bug 491193 - fix intl warnings. r=smontagu

This commit is contained in:
timeless@mozdev.org 2009-05-18 12:44:02 +02:00
Родитель 01dbd43a3e
Коммит 69843112f0
3 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -101,7 +101,7 @@ nsConverterOutputStream::Write(PRUint32 aCount, const PRUnichar* aChars,
nsCAutoString buf;
buf.SetLength(maxLen);
if (buf.Length() != maxLen)
if (buf.Length() != (PRUint32) maxLen)
return NS_ERROR_OUT_OF_MEMORY;
PRInt32 outLen = maxLen;
@ -112,7 +112,7 @@ nsConverterOutputStream::Write(PRUint32 aCount, const PRUnichar* aChars,
// Yes, NS_ERROR_UENC_NOMAPPING is a success code
return NS_ERROR_LOSS_OF_SIGNIFICANT_DATA;
}
NS_ASSERTION(inLen == aCount,
NS_ASSERTION((PRUint32) inLen == aCount,
"Converter didn't consume all the data!");
PRUint32 written;

Просмотреть файл

@ -587,6 +587,10 @@ NS_IMETHODIMP nsISO2022CNToUnicode::Convert(const char * aSrc, PRInt32 * aSrcLen
}
break;
case eState_ERROR:
NS_NOTREACHED("unhandled case");
goto error2;
} // switch
src++;
}

Просмотреть файл

@ -662,8 +662,8 @@ nsCharType GetCharType(PRUint32 aChar)
nsCharType oResult;
eBidiCategory bCat = GetBidiCat(aChar);
if (eBidiCat_CC != bCat) {
NS_ASSERTION(bCat < (sizeof(ebc2ucd)/sizeof(nsCharType)), "size mismatch");
if(bCat < (sizeof(ebc2ucd)/sizeof(nsCharType)))
NS_ASSERTION((PRUint32) bCat < (sizeof(ebc2ucd)/sizeof(nsCharType)), "size mismatch");
if((PRUint32) bCat < (sizeof(ebc2ucd)/sizeof(nsCharType)))
oResult = ebc2ucd[bCat];
else
oResult = ebc2ucd[0]; // something is very wrong, but we need to return a value