fix some gcc 4 warnings in xpcom. patch by Christian Haberstroh. b=382753 r=bent sr=bsmedberg

This commit is contained in:
joshmoz@gmail.com 2007-06-04 08:44:43 -07:00
parent 08d6acee7c
commit 066729b99b
2 changed files with 3 additions and 3 deletions

View File

@ -2746,7 +2746,7 @@ nsComponentManagerImpl::GetLoaderType(const char *typeStr)
const nsDependentCString type(typeStr);
for (int i=0; i < mLoaderData.Length(); ++i) {
for (unsigned int i = 0; i < mLoaderData.Length(); ++i) {
if (mLoaderData[i].type == type)
return i;
}
@ -3100,7 +3100,7 @@ nsComponentManagerImpl::LoadDeferredModules(nsTArray<DeferredModule> &aDeferred)
// 1) they're all gone
// 2) we loop through and none of them succeed
PRInt32 lastCount = PR_INT32_MAX;
PRUint32 lastCount = PR_UINT32_MAX;
while (aDeferred.Length() > 0 &&
lastCount > aDeferred.Length()) {

View File

@ -2262,7 +2262,7 @@ nsresult nsLocalFile::CFStringReftoUTF8(CFStringRef aInStrRef, nsACString& aOutS
kCFStringEncodingUTF8, 0, PR_FALSE, nsnull, 0, &usedBufLen);
if (charsConverted == inStrLen) {
aOutStr.SetLength(usedBufLen);
if (aOutStr.Length() != usedBufLen)
if (aOutStr.Length() != (unsigned int)usedBufLen)
return NS_ERROR_OUT_OF_MEMORY;
UInt8 *buffer = (UInt8*) aOutStr.BeginWriting();