Bug 739248 - fix signed/unsigned comparison warnings in the spellchecker; r=ehsan
authorNathan Froyd <froydnj@mozilla.com>
Mon, 26 Mar 2012 11:39:19 -0400
changeset 93661 6363e4983d50717dd6f7d2bfa2c5ff15e396bb53
parent 93660 30bdb43d4a4a8760daed201771387a7198af2e7a
child 93662 940563684bef47e0f9556774214ba568de13ed79
push idunknown
push userunknown
push dateunknown
reviewersehsan
bugs739248
milestone14.0a1
Bug 739248 - fix signed/unsigned comparison warnings in the spellchecker; r=ehsan
extensions/spellcheck/hunspell/src/mozHunspell.cpp
extensions/spellcheck/src/mozSpellChecker.cpp
--- a/extensions/spellcheck/hunspell/src/mozHunspell.cpp
+++ b/extensions/spellcheck/hunspell/src/mozHunspell.cpp
@@ -415,17 +415,17 @@ mozHunspell::LoadDictionaryList()
     dictDirs->GetNext(getter_AddRefs(elem));
 
     dictDir = do_QueryInterface(elem);
     if (dictDir)
       LoadDictionariesFromDir(dictDir);
   }
 
   // find dictionaries from restartless extensions
-  for (PRUint32 i = 0; i < mDynamicDirectories.Count(); i++) {
+  for (PRInt32 i = 0; i < mDynamicDirectories.Count(); i++) {
     LoadDictionariesFromDir(mDynamicDirectories[i]);
   }
 
   // Now we have finished updating the list of dictionaries, update the current
   // dictionary and any editors which may use it.
   mozInlineSpellChecker::UpdateCanEnableInlineSpellChecking();
 
   // Check if the current dictionary is still available.
--- a/extensions/spellcheck/src/mozSpellChecker.cpp
+++ b/extensions/spellcheck/src/mozSpellChecker.cpp
@@ -313,17 +313,17 @@ mozSpellChecker::GetDictionaryList(nsTAr
   // For catching duplicates
   nsClassHashtable<nsStringHashKey, nsCString> dictionaries;
   dictionaries.Init();
 
   nsCOMArray<mozISpellCheckingEngine> spellCheckingEngines;
   rv = GetEngineList(&spellCheckingEngines);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  for (PRUint32 i = 0; i < spellCheckingEngines.Count(); i++) {
+  for (PRInt32 i = 0; i < spellCheckingEngines.Count(); i++) {
     nsCOMPtr<mozISpellCheckingEngine> engine = spellCheckingEngines[i];
 
     PRUint32 count = 0;
     PRUnichar **words = NULL;
     engine->GetDictionaryList(&words, &count);
     for (PRUint32 k = 0; k < count; k++) {
       nsAutoString dictName;
 
@@ -371,17 +371,17 @@ mozSpellChecker::SetCurrentDictionary(co
     return NS_OK;
   }
 
   nsresult rv;
   nsCOMArray<mozISpellCheckingEngine> spellCheckingEngines;
   rv = GetEngineList(&spellCheckingEngines);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  for (PRUint32 i = 0; i < spellCheckingEngines.Count(); i++) {
+  for (PRInt32 i = 0; i < spellCheckingEngines.Count(); i++) {
     // We must set mSpellCheckingEngine before we call SetDictionary, since
     // SetDictionary calls back to this spell checker to check if the
     // dictionary was set
     mSpellCheckingEngine = spellCheckingEngines[i];
 
     rv = mSpellCheckingEngine->SetDictionary(PromiseFlatString(aDictionary).get());
 
     if (NS_SUCCEEDED(rv)) {