Bug 822804: Mark variables destIdx & destPos in GfxDriverInfo.h as unsigned, to fix build warning for unsigned/signed comparison. r=Bas
authorDaniel Holbert <dholbert@cs.stanford.edu>
Sat, 22 Dec 2012 09:29:04 -0800
changeset 116860 84320dffec6e55f92fd01bde61ea367b325850ed
parent 116859 ea373e5342455598e2ce67c568da13feb233cb37
child 116861 7b74f4ee76c9c7987ffd4a282954f5214eec283c
child 117365 ff1aad58f1ade238c373e91cd54c637bf36c2cce
child 117937 dbde4d3de84d022543925b7984972ed03ca4bd96
push id24073
push userdholbert@mozilla.com
push dateSat, 22 Dec 2012 17:29:25 +0000
treeherdermozilla-central@84320dffec6e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas
bugs822804
milestone20.0a1
first release with
nightly linux32
84320dffec6e / 20.0a1 / 20121223030832 / files
nightly linux64
84320dffec6e / 20.0a1 / 20121223030832 / files
nightly mac
84320dffec6e / 20.0a1 / 20121223030832 / files
nightly win32
84320dffec6e / 20.0a1 / 20121223030832 / files
nightly win64
84320dffec6e / 20.0a1 / 20121223030832 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 822804: Mark variables destIdx & destPos in GfxDriverInfo.h as unsigned, to fix build warning for unsigned/signed comparison. r=Bas
widget/xpwidgets/GfxDriverInfo.h
--- a/widget/xpwidgets/GfxDriverInfo.h
+++ b/widget/xpwidgets/GfxDriverInfo.h
@@ -144,18 +144,18 @@ V(uint32_t a, uint32_t b, uint32_t c, ui
 }
 
 // All destination string storage needs to have at least 5 bytes available.
 inline bool SplitDriverVersion(const char *aSource, char *aAStr, char *aBStr, char *aCStr, char *aDStr)
 {
   // sscanf doesn't do what we want here to we parse this manually.
   int len = strlen(aSource);
   char *dest[4] = { aAStr, aBStr, aCStr, aDStr };
-  int destIdx = 0;
-  int destPos = 0;
+  unsigned destIdx = 0;
+  unsigned destPos = 0;
 
   for (int i = 0; i < len; i++) {
     if (destIdx > ArrayLength(dest)) {
       // Invalid format found. Ensure we don't access dest beyond bounds.
       return false;
     }
 
     if (aSource[i] == '.') {