kill unused vars in folly
authorPaul Tarjan <ptarjan@fb.com>
Fri, 28 Feb 2014 09:25:57 +0000 (01:25 -0800)
committerDave Watson <davejwatson@fb.com>
Fri, 28 Feb 2014 22:03:22 +0000 (14:03 -0800)
Summary: these print as errors when compiling hhvm opensource

Test Plan: none

Reviewed By: tudorb@fb.com

FB internal diff: D1195649

folly/detail/MemoryIdler.cpp
folly/experimental/symbolizer/Symbolizer.cpp

index 711bd90fe42f89e9bcd4c4ee980f7807c2972b9a..680a7562545405c7ee1429dfefe93f593e799aa7 100644 (file)
@@ -163,8 +163,7 @@ void MemoryIdler::unmapUnusedStack(size_t retain) {
     // errno of ENOMEM.  We can also get an EAGAIN, theoretically.
     // EINVAL means either an invalid alignment or length, or that some
     // of the pages are locked or shared.  Neither should occur.
-    int e = errno;
-    assert(e == EAGAIN || e == ENOMEM);
+    assert(errno == EAGAIN || errno == ENOMEM);
   }
 }
 
index e2e090adfa11b31ccb71f2320c162c103fec4cf9..80601aef18c1ef7cf2dcd303d6f15bce6a268e12 100644 (file)
@@ -189,8 +189,6 @@ void Symbolizer::symbolize(const uintptr_t* addresses,
   char buf[PATH_MAX + 100];  // Long enough for any line
   LineReader reader(fd, buf, sizeof(buf));
 
-  char fileNameBuf[PATH_MAX];
-
   while (remaining != 0) {
     StringPiece line;
     if (reader.readLine(line) != LineReader::kReading) {