tests+tools: fix build with clang-5.0

Change-Id: I75eeb01b071c1702517a65a8099e52d4092a4638
Refs: #4278
diff --git a/tests/core/manager-base.t.cpp b/tests/core/manager-base.t.cpp
index 7a7cd12..63bc2db 100644
--- a/tests/core/manager-base.t.cpp
+++ b/tests/core/manager-base.t.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
@@ -66,10 +66,10 @@
   ndn::mgmt::Authorization
   makeAuthorization(const std::string& verb) override
   {
-    return [this] (const Name& prefix, const Interest& interest,
-                   const ndn::mgmt::ControlParameters* params,
-                   ndn::mgmt::AcceptContinuation accept,
-                   ndn::mgmt::RejectContinuation reject) {
+    return [] (const Name& prefix, const Interest& interest,
+               const ndn::mgmt::ControlParameters* params,
+               ndn::mgmt::AcceptContinuation accept,
+               ndn::mgmt::RejectContinuation reject) {
       accept("requester");
     };
   }
diff --git a/tests/daemon/face/tcp-transport.t.cpp b/tests/daemon/face/tcp-transport.t.cpp
index c2b0235..bf04b63 100644
--- a/tests/daemon/face/tcp-transport.t.cpp
+++ b/tests/daemon/face/tcp-transport.t.cpp
@@ -154,7 +154,7 @@
 
   bool didStateChange = false;
   transport->afterStateChange.connectSingleShot(
-    [this, &didStateChange] (TransportState oldState, TransportState newState) {
+    [&didStateChange] (TransportState oldState, TransportState newState) {
       didStateChange = true;
       BOOST_CHECK_EQUAL(oldState, TransportState::DOWN);
       BOOST_CHECK_EQUAL(newState, TransportState::FAILED);
diff --git a/tests/daemon/mgmt/face-manager-create-face.t.cpp b/tests/daemon/mgmt/face-manager-create-face.t.cpp
index 19a10c7..4431256 100644
--- a/tests/daemon/mgmt/face-manager-create-face.t.cpp
+++ b/tests/daemon/mgmt/face-manager-create-face.t.cpp
@@ -353,7 +353,7 @@
 
     bool hasCallbackFired = false;
     this->node1.face.onSendData.connect(
-      [this, req, &hasCallbackFired, foundFace] (const Data& response) {
+      [req, foundFace, &hasCallbackFired] (const Data& response) {
         if (!req.getName().isPrefixOf(response.getName())) {
           return;
         }
diff --git a/tests/daemon/mgmt/face-manager-update-face.t.cpp b/tests/daemon/mgmt/face-manager-update-face.t.cpp
index 1d647fc..9a6825e 100644
--- a/tests/daemon/mgmt/face-manager-update-face.t.cpp
+++ b/tests/daemon/mgmt/face-manager-update-face.t.cpp
@@ -124,7 +124,7 @@
 
     bool hasCallbackFired = false;
     signal::ScopedConnection connection = this->node1.face.onSendData.connect(
-      [this, req, &hasCallbackFired, &checkResp] (const Data& response) {
+      [req, &hasCallbackFired, &checkResp] (const Data& response) {
         if (!req.getName().isPrefixOf(response.getName())) {
           return;
         }
diff --git a/tests/tools/nfdc/status-fixture.hpp b/tests/tools/nfdc/status-fixture.hpp
index 8c9eb3c..e1974b9 100644
--- a/tests/tools/nfdc/status-fixture.hpp
+++ b/tests/tools/nfdc/status-fixture.hpp
@@ -81,8 +81,9 @@
   fetchStatus()
   {
     nFetchStatusSuccess = 0;
-    module.fetchStatus(controller, [this] { ++nFetchStatusSuccess; },
-                       [this] (uint32_t code, const std::string& reason) {
+    module.fetchStatus(controller,
+                       [this] { ++nFetchStatusSuccess; },
+                       [] (uint32_t code, const std::string& reason) {
                          BOOST_FAIL("fetchStatus failure " << code << " " << reason);
                        },
                        CommandOptions());
diff --git a/tests/tools/nfdc/strategy-choice-module.t.cpp b/tests/tools/nfdc/strategy-choice-module.t.cpp
index c14a446..32a14c9 100644
--- a/tests/tools/nfdc/strategy-choice-module.t.cpp
+++ b/tests/tools/nfdc/strategy-choice-module.t.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
@@ -198,7 +198,7 @@
 
 BOOST_AUTO_TEST_CASE(CannotUnsetDefault)
 {
-  this->processInterest = [this] (const Interest& interest) {
+  this->processInterest = [] (const Interest&) {
     BOOST_ERROR("unexpected command");
   };
 
diff --git a/tools/nfd-autoreg.cpp b/tools/nfd-autoreg.cpp
index 39b7f6b..cb0bdd2 100644
--- a/tools/nfd-autoreg.cpp
+++ b/tools/nfd-autoreg.cpp
@@ -213,7 +213,7 @@
                                    faceStatus.getFacePersistency());
         }
       },
-      [this] (uint32_t code, const std::string& reason) {});
+      [] (uint32_t code, const std::string& reason) {});
   }
 
   int