Bug 1111190 - Fix sign-compare warnings in CollectIonReports; r=froydnj
authorMs2ger <ms2ger@gmail.com>
Sat, 13 Dec 2014 14:46:03 +0100
changeset 219651 d13ba6a6b8b97a237f846e89fac4731897d57b19
parent 219650 01e69340d971206dbefb48094204ffaf6771c488
child 219652 4c4c162bfc77a46c44729b66b2d5853c698fd137
push id10400
push userryanvm@gmail.com
push dateMon, 15 Dec 2014 18:54:54 +0000
treeherderfx-team@5d6e0d038f95 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1111190
milestone37.0a1
Bug 1111190 - Fix sign-compare warnings in CollectIonReports; r=froydnj We only use kNumFields to compare it to the result of int sscanf(...).
xpcom/base/SystemMemoryReporter.cpp
--- a/xpcom/base/SystemMemoryReporter.cpp
+++ b/xpcom/base/SystemMemoryReporter.cpp
@@ -713,17 +713,17 @@ private:
 
     // The first three fields of each entry interest us:
     //   1) client - Essentially the process name. We limit client names to 63
     //               characters, in theory they should never be greater than 15
     //               due to thread name length limitations.
     //   2) pid    - The ID of the allocating process, read as a uint32_t.
     //   3) size   - The size of the allocation in bytes, read as as a uint64_t.
     const char* const kFormatString = "%63s %" SCNu32 " %" SCNu64;
-    const size_t kNumFields = 3;
+    const int kNumFields = 3;
     const size_t kStringSize = 64;
     const char* const kIonIommuPath = "/sys/kernel/debug/ion/iommu";
 
     FILE* iommu = fopen(kIonIommuPath, "r");
     if (!iommu) {
       if (NS_WARN_IF(errno != ENOENT)) {
         return NS_ERROR_FAILURE;
       }