Bug 581467 - Fix warning: comparison between signed and unsigned integer expressions in XPT_ParseVersionString; r=bsmedberg
authorAtul Aggarwal <atulagrwl@gmail.com>
Wed, 31 Aug 2011 23:45:31 +0100
changeset 76356 4ff7e79b62a9256a4658450d9b4de6570e85d2b5
parent 76355 ebfdb08589471c3cb3ab297665d0b8a1b5ac2a28
child 76357 6c63fffe3b216260a9fae5b4b0ea6d8f985b0b67
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersbsmedberg
bugs581467
milestone9.0a1
Bug 581467 - Fix warning: comparison between signed and unsigned integer expressions in XPT_ParseVersionString; r=bsmedberg
xpcom/typelib/xpt/src/xpt_struct.c
--- a/xpcom/typelib/xpt/src/xpt_struct.c
+++ b/xpcom/typelib/xpt/src/xpt_struct.c
@@ -936,17 +936,17 @@ XPT_GetInterfaceIndexByName(XPTInterface
 }
 
 static XPT_TYPELIB_VERSIONS_STRUCT versions[] = XPT_TYPELIB_VERSIONS;
 #define XPT_TYPELIB_VERSIONS_COUNT (sizeof(versions) / sizeof(versions[0]))
 
 XPT_PUBLIC_API(PRUint16)
 XPT_ParseVersionString(const char* str, PRUint8* major, PRUint8* minor)
 {
-    int i;
+    unsigned int i;
     for (i = 0; i < XPT_TYPELIB_VERSIONS_COUNT; i++) {
         if (!strcmp(versions[i].str, str)) {
             *major = versions[i].major;
             *minor = versions[i].minor;
             return versions[i].code;
         }
     }
     return XPT_VERSION_UNKNOWN;