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 id21097
push userbmo@edmorley.co.uk
push dateThu, 01 Sep 2011 07:45:07 +0000
treeherdermozilla-central@7d3d1c2c75f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs581467
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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;