Bug 551775: Add unsigned-int cast in NS_ColorNameToRGB to fix build warning. r=roc
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 11 Mar 2010 22:03:49 -0800
changeset 39314 8fc409b1e7b37821d13191467b6531589c9fccf7
parent 39313 8023fbbd3a7078571ac925561a6fe045da71e0c7
child 39315 68363c7a7f0649e7df63706e25edd0d4ba645a15
push id12127
push userdholbert@mozilla.com
push dateFri, 12 Mar 2010 06:10:47 +0000
treeherdermozilla-central@cdc9b315087b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs551775
milestone1.9.3a3pre
Bug 551775: Add unsigned-int cast in NS_ColorNameToRGB to fix build warning. r=roc
gfx/src/nsColor.cpp
--- a/gfx/src/nsColor.cpp
+++ b/gfx/src/nsColor.cpp
@@ -202,17 +202,18 @@ NS_GFX_(PRBool) NS_LooseHexToRGB(const n
 }
 
 NS_GFX_(PRBool) NS_ColorNameToRGB(const nsAString& aColorName, nscolor* aResult)
 {
   if (!gColorTable) return PR_FALSE;
 
   PRInt32 id = gColorTable->Lookup(aColorName);
   if (eColorName_UNKNOWN < id) {
-    NS_ASSERTION(id < eColorName_COUNT, "LookupName mess up");
+    NS_ASSERTION(PRUint32(id) < eColorName_COUNT,
+                 "gColorTable->Lookup messed up");
     if (aResult) {
       *aResult = kColors[id];
     }
     return PR_TRUE;
   }
   return PR_FALSE;
 }