diff --git a/daemon/face/tcp-channel.cpp b/daemon/face/tcp-channel.cpp
index 54a620c..7ffb0f3 100644
--- a/daemon/face/tcp-channel.cpp
+++ b/daemon/face/tcp-channel.cpp
@@ -113,7 +113,7 @@
       options.allowCongestionMarking = m_wantCongestionMarking;
     }
     else {
-      options.allowCongestionMarking = params.wantCongestionMarking;
+      options.allowCongestionMarking = bool(params.wantCongestionMarking);
     }
 
     if (params.baseCongestionMarkingInterval) {
diff --git a/daemon/face/udp-channel.cpp b/daemon/face/udp-channel.cpp
index 6497c30..b9da25e 100644
--- a/daemon/face/udp-channel.cpp
+++ b/daemon/face/udp-channel.cpp
@@ -169,7 +169,7 @@
     options.allowCongestionMarking = m_wantCongestionMarking;
   }
   else {
-    options.allowCongestionMarking = params.wantCongestionMarking;
+    options.allowCongestionMarking = bool(params.wantCongestionMarking);
   }
 
   if (params.baseCongestionMarkingInterval) {
diff --git a/tests/daemon/fw/unsolicited-data-policy.t.cpp b/tests/daemon/fw/unsolicited-data-policy.t.cpp
index 8cc7a70..e6b73ad 100644
--- a/tests/daemon/fw/unsolicited-data-policy.t.cpp
+++ b/tests/daemon/fw/unsolicited-data-policy.t.cpp
@@ -61,12 +61,12 @@
 
     tribool isFound = indeterminate;
     cs.find(Interest(data.getFullName()),
-      bind([&] { isFound = true; }),
-      bind([&] { isFound = false; }));
+            bind([&] { isFound = true; }),
+            bind([&] { isFound = false; }));
 
-    this->advanceClocks(time::milliseconds(1));
+    this->advanceClocks(1_ms);
     BOOST_REQUIRE(!indeterminate(isFound));
-    return isFound;
+    return bool(isFound);
   }
 
 protected:
diff --git a/tests/daemon/mgmt/face-manager-update-face.t.cpp b/tests/daemon/mgmt/face-manager-update-face.t.cpp
index 1be0647..4cd6fb6 100644
--- a/tests/daemon/mgmt/face-manager-update-face.t.cpp
+++ b/tests/daemon/mgmt/face-manager-update-face.t.cpp
@@ -74,7 +74,7 @@
     params.setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, enableReliability);
 
     if (!boost::logic::indeterminate(enableCongestionMarking)) {
-      params.setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, enableCongestionMarking);
+      params.setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, bool(enableCongestionMarking));
     }
 
     createFace(params);
diff --git a/tests/tools/ndn-autoconfig/procedure.t.cpp b/tests/tools/ndn-autoconfig/procedure.t.cpp
index 86dc484..ec7cf31 100644
--- a/tests/tools/ndn-autoconfig/procedure.t.cpp
+++ b/tests/tools/ndn-autoconfig/procedure.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -26,6 +26,7 @@
 #include "ndn-autoconfig/procedure.hpp"
 
 #include "../mock-nfd-mgmt-fixture.hpp"
+
 #include <boost/logic/tribool.hpp>
 
 namespace ndn {
@@ -51,12 +52,14 @@
   runOnce()
   {
     BOOST_ASSERT(procedure != nullptr);
+
     boost::logic::tribool result;
-    procedure->onComplete.connectSingleShot([&] (bool result1) { result = result1; });
+    procedure->onComplete.connectSingleShot([&] (bool res) { result = res; });
     procedure->runOnce();
     face.processEvents();
-    BOOST_CHECK_MESSAGE(!boost::logic::indeterminate(result), "onComplete is not invoked");
-    return result;
+
+    BOOST_REQUIRE_MESSAGE(!boost::logic::indeterminate(result), "onComplete was not invoked");
+    return bool(result);
   }
 
 public:
@@ -71,7 +74,8 @@
    *  \param result expected result, nullopt to cause a failued
    *  \param io io_service to asynchronously post the result
    */
-  DummyStage(const std::string& stageName, int* nCalls, const optional<FaceUri>& result, boost::asio::io_service& io)
+  DummyStage(const std::string& stageName, int* nCalls,
+             const optional<FaceUri>& result, boost::asio::io_service& io)
     : m_stageName(stageName)
     , m_nCalls(nCalls)
     , m_result(result)
diff --git a/tools/nfdc/cs-module.cpp b/tools/nfdc/cs-module.cpp
index fafd095..1b9915e 100644
--- a/tools/nfdc/cs-module.cpp
+++ b/tools/nfdc/cs-module.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -65,10 +65,10 @@
     p.setCapacity(*capacity);
   }
   if (!indeterminate(enableAdmit)) {
-    p.setFlagBit(ndn::nfd::BIT_CS_ENABLE_ADMIT, enableAdmit);
+    p.setFlagBit(ndn::nfd::BIT_CS_ENABLE_ADMIT, bool(enableAdmit));
   }
   if (!indeterminate(enableServe)) {
-    p.setFlagBit(ndn::nfd::BIT_CS_ENABLE_SERVE, enableServe);
+    p.setFlagBit(ndn::nfd::BIT_CS_ENABLE_SERVE, bool(enableServe));
   }
 
   ctx.controller.start<ndn::nfd::CsConfigCommand>(p,
diff --git a/tools/nfdc/face-module.cpp b/tools/nfdc/face-module.cpp
index 7bde8bf..83c6006 100644
--- a/tools/nfdc/face-module.cpp
+++ b/tools/nfdc/face-module.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -203,7 +203,7 @@
       ControlParameters params;
       params.setFaceId(respParams.getFaceId()).setFacePersistency(persistency);
       if (!boost::logic::indeterminate(lpReliability)) {
-        params.setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, lpReliability);
+        params.setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, bool(lpReliability));
       }
       ctx.controller.start<ndn::nfd::FaceUpdateCommand>(
           params,
@@ -222,11 +222,11 @@
 
       if (!boost::logic::indeterminate(lpReliability) &&
           lpReliability != respParams.getFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED)) {
-        params.setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, lpReliability);
+        params.setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, bool(lpReliability));
       }
       if (!boost::logic::indeterminate(congestionMarking) &&
           congestionMarking != respParams.getFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED)) {
-        params.setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, congestionMarking);
+        params.setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, bool(congestionMarking));
       }
 
       if (baseCongestionMarkingIntervalMs) {
@@ -258,10 +258,10 @@
     }
     params.setFacePersistency(persistency);
     if (!boost::logic::indeterminate(lpReliability)) {
-      params.setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, lpReliability);
+      params.setFlagBit(ndn::nfd::BIT_LP_RELIABILITY_ENABLED, bool(lpReliability));
     }
     if (!boost::logic::indeterminate(congestionMarking)) {
-      params.setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, congestionMarking);
+      params.setFlagBit(ndn::nfd::BIT_CONGESTION_MARKING_ENABLED, bool(congestionMarking));
     }
     if (baseCongestionMarkingIntervalMs) {
       params.setBaseCongestionMarkingInterval(time::milliseconds(*baseCongestionMarkingIntervalMs));
