Bug 911425 - Fix -Wsign-compare warning in xpcom/glue/FileUtils.cpp. r=glandium
authorChris Peterson <cpeterson@mozilla.com>
Wed, 07 Aug 2013 22:52:41 -0700
changeset 145242 3a23243301c90741d3cf9c310c731473cc566977
parent 145241 1604454f8d214b06225e7118a6864064131bfedb
child 145243 14d93040175bd84f961d2910a2197d03c69cec63
push id25203
push useremorley@mozilla.com
push dateTue, 03 Sep 2013 11:11:23 +0000
treeherdermozilla-central@541ba36e8b9d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs911425
milestone26.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 911425 - Fix -Wsign-compare warning in xpcom/glue/FileUtils.cpp. r=glandium
xpcom/glue/FileUtils.cpp
--- a/xpcom/glue/FileUtils.cpp
+++ b/xpcom/glue/FileUtils.cpp
@@ -445,17 +445,17 @@ mozilla::ReadAheadLib(mozilla::pathstr_t
 
   // The Mach header is followed by a sequence of load commands.
   // Each command has a header containing the command type and the
   // command size. LD_SEGMENT commands describes how the dynamic
   // loader is going to map the file in memory. We use that
   // information to find the biggest offset from the library that
   // will be mapped in memory.
   char *cmd = &base[sizeof(struct cpu_mach_header)];
-  off_t end = 0;
+  uint32_t end = 0;
   for (uint32_t ncmds = mh->ncmds; ncmds; ncmds--) {
     struct segment_command *sh = (struct segment_command *)cmd;
     if (sh->cmd != LC_SEGMENT) {
       continue;
     }
     if (end < sh->fileoff + sh->filesize) {
       end = sh->fileoff + sh->filesize;
     }