Bug 1261384: Clean up warnings-as-errors nits in jprof (NPOTB) rs=me
authorRandell Jesup <rjesup@jesup.org>
Fri, 01 Apr 2016 11:08:04 -0400
changeset 291255 1a33b1821e5bbafcd6837c755bc1d8fc6b25325b
parent 291254 325b2f66c001df47005b17b52477496e650ac12d
child 291256 7a58737fdf650018b9ee5df3184fe822d3391f3f
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1261384
milestone48.0a1
Bug 1261384: Clean up warnings-as-errors nits in jprof (NPOTB) rs=me Not enabled by default. MozReview-Commit-ID: IASV3aPem96
tools/jprof/stub/libmalloc.cpp
--- a/tools/jprof/stub/libmalloc.cpp
+++ b/tools/jprof/stub/libmalloc.cpp
@@ -90,17 +90,16 @@ JPROF_STATIC void CrawlStack(malloc_log_
                              void* stack_top, void* top_instr_ptr)
 {
 #if USE_GLIBC_BACKTRACE
     // This probably works on more than x86!  But we need a way to get the
     // top instruction pointer, which is kindof arch-specific
     void *array[500];
     int cnt, i;
     u_long numpcs = 0;
-    bool tracing = false;
 
     // This is from glibc.  A more generic version might use
     // libunwind and/or CaptureStackBackTrace() on Windows
     cnt = backtrace(&array[0],sizeof(array)/sizeof(array[0]));
 
     // StackHook->JprofLog->CrawlStack
     // Then we have sigaction, which replaced top_instr_ptr
     array[3] = top_instr_ptr;
@@ -628,22 +627,22 @@ NS_EXPORT_(void) setupProfilingStuff(voi
                 }
 	    }
 
 	    char *circular_op = strstr(tst,"JP_CIRCULAR=");
 	    if(circular_op) {
                 size_t size = atol(circular_op+strlen("JP_CIRCULAR="));
                 if (size < 1000) {
                     fprintf(stderr,
-                            "JP_CIRCULAR of %d less than 1000, using 10000\n",
-                            size);
+                            "JP_CIRCULAR of %lu less than 1000, using 10000\n",
+                            (unsigned long) size);
                     size = 10000;
                 }
                 JprofBufferInit(size);
-                fprintf(stderr,"JP_CIRCULAR buffer of %d bytes\n",size);
+                fprintf(stderr,"JP_CIRCULAR buffer of %lu bytes\n", (unsigned long) size);
                 circular = true;
 	    }
 
 	    char *first = strstr(tst, "JP_FIRST=");
 	    if(first) {
                 firstDelay = atol(first+strlen("JP_FIRST="));
 	    }
 
@@ -663,17 +662,17 @@ NS_EXPORT_(void) setupProfilingStuff(voi
                     rtcHz = 2048;
                 }
 #else
                 fputs("JP_RTC_HZ found, but RTC profiling only supported on "
                       "Linux!\n", stderr);
                   
 #endif
             }
-            char *f = strstr(tst,"JP_FILENAME=");
+            const char *f = strstr(tst,"JP_FILENAME=");
             if (f)
                 f = f + strlen("JP_FILENAME=");
             else
                 f = M_LOGFILE;
 
             char *is_slave = getenv("JPROF_SLAVE");
             if (!is_slave)
                 setenv("JPROF_SLAVE","", 0);