diff --git a/tools/chunks/putchunks/producer.cpp b/tools/chunks/putchunks/producer.cpp
index 0a39c3b..c353817 100644
--- a/tools/chunks/putchunks/producer.cpp
+++ b/tools/chunks/putchunks/producer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2021, Regents of the University of California,
+ * Copyright (c) 2016-2022, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -41,7 +41,7 @@
   , m_keyChain(keyChain)
   , m_options(opts)
 {
-  if (prefix.size() > 0 && prefix[-1].isVersion()) {
+  if (!prefix.empty() && prefix[-1].isVersion()) {
     m_prefix = prefix.getPrefix(-1);
     m_versionedPrefix = prefix;
   }
@@ -115,7 +115,7 @@
 void
 Producer::processSegmentInterest(const Interest& interest)
 {
-  BOOST_ASSERT(m_store.size() > 0);
+  BOOST_ASSERT(!m_store.empty());
 
   if (m_options.isVerbose)
     std::cerr << "Interest: " << interest << "\n";
@@ -164,7 +164,7 @@
     if (nCharsRead > 0) {
       auto data = make_shared<Data>(Name(m_versionedPrefix).appendSegment(m_store.size()));
       data->setFreshnessPeriod(m_options.freshnessPeriod);
-      data->setContent(buffer.data(), static_cast<size_t>(nCharsRead));
+      data->setContent(make_span(buffer).first(nCharsRead));
       m_store.push_back(data);
     }
   }
diff --git a/tools/dump/ndndump.cpp b/tools/dump/ndndump.cpp
index ed7fd93..cb1583f 100644
--- a/tools/dump/ndndump.cpp
+++ b/tools/dump/ndndump.cpp
@@ -207,8 +207,7 @@
     shouldPrint = printPpp(out, payload, pkthdr->len);
     break;
   default:
-    BOOST_ASSERT(false);
-    return;
+    NDN_CXX_UNREACHABLE;
   }
 
   if (shouldPrint) {
@@ -220,9 +219,9 @@
 }
 
 void
-NdnDump::printTimestamp(std::ostream& os, const timeval& tv) const
+NdnDump::printTimestamp(std::ostream& os, const timeval& tv)
 {
-  /// \todo Add more timestamp formats (time since previous packet, time since first packet, ...)
+  // TODO: Add more timestamp formats (time since previous packet, time since first packet, ...)
   os << tv.tv_sec
      << "."
      << std::setfill('0') << std::setw(6) << tv.tv_usec
@@ -520,7 +519,7 @@
 
   bool isOk = false;
   Block block;
-  std::tie(isOk, block) = Block::fromBuffer(pkt, len);
+  std::tie(isOk, block) = Block::fromBuffer({pkt, len});
   if (!isOk) {
     // if packet is incomplete, we will not be able to process it
     out << "NDN truncated packet, length " << len;
@@ -549,8 +548,7 @@
       return true;
     }
 
-    bool isOk = false;
-    std::tie(isOk, netPacket) = Block::fromBuffer(&*begin, std::distance(begin, end));
+    std::tie(isOk, netPacket) = Block::fromBuffer({begin, end});
     if (!isOk) {
       // if network packet is fragmented, we will not be able to process it
       out << " fragment";
diff --git a/tools/dump/ndndump.hpp b/tools/dump/ndndump.hpp
index 58ba032..47a455a 100644
--- a/tools/dump/ndndump.hpp
+++ b/tools/dump/ndndump.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2011-2019, Regents of the University of California.
+ * Copyright (c) 2011-2022, Regents of the University of California.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -66,8 +66,8 @@
   }
 
 private:
-  void
-  printTimestamp(std::ostream& os, const timeval& tv) const;
+  static void
+  printTimestamp(std::ostream& os, const timeval& tv);
 
   bool
   dispatchByEtherType(OutputFormatter& out, const uint8_t* pkt, size_t len, uint16_t etherType) const;
