diff --git a/src/encoding/block.cpp b/src/encoding/block.cpp
index 09acafd..13b10bc 100644
--- a/src/encoding/block.cpp
+++ b/src/encoding/block.cpp
@@ -131,11 +131,6 @@
   m_valueBegin = m_begin + typeLengthSize;
 }
 
-Block::Block(const void* buf, size_t bufSize)
-  : Block(reinterpret_cast<const uint8_t*>(buf), bufSize)
-{
-}
-
 Block::Block(uint32_t type)
   : m_type(type)
   , m_size(tlv::sizeOfVarNumber(m_type) + tlv::sizeOfVarNumber(0))
diff --git a/src/encoding/block.hpp b/src/encoding/block.hpp
index 177d1f2..2e0601d 100644
--- a/src/encoding/block.hpp
+++ b/src/encoding/block.hpp
@@ -119,11 +119,6 @@
    */
   Block(const uint8_t* buf, size_t bufSize);
 
-  /** @brief Parse Block from a raw buffer
-   *  @deprecated use Block(const uint8_t*, size_t)
-   */
-  Block(const void* buf, size_t bufSize);
-
   /** @brief Create an empty Block with specified TLV-TYPE
    *  @param type TLV-TYPE
    */
diff --git a/src/util/sqlite3-statement.cpp b/src/util/sqlite3-statement.cpp
index f1871db..736b266 100644
--- a/src/util/sqlite3-statement.cpp
+++ b/src/util/sqlite3-statement.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2015 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -33,7 +33,7 @@
 
 Sqlite3Statement::Sqlite3Statement(sqlite3* database, const std::string& statement)
 {
-  int res = sqlite3_prepare_v2(database, statement.c_str(), -1, &m_stmt, nullptr);
+  int res = sqlite3_prepare_v2(database, statement.data(), -1, &m_stmt, nullptr);
   if (res != SQLITE_OK)
     BOOST_THROW_EXCEPTION(std::domain_error("bad SQL statement: " + statement));
 }
@@ -78,7 +78,8 @@
 Block
 Sqlite3Statement::getBlock(int column)
 {
-  return Block(sqlite3_column_blob(m_stmt, column), sqlite3_column_bytes(m_stmt, column));
+  return Block(reinterpret_cast<const uint8_t*>(sqlite3_column_blob(m_stmt, column)),
+               sqlite3_column_bytes(m_stmt, column));
 }
 
 int
diff --git a/tests/unit-tests/encoding/block.t.cpp b/tests/unit-tests/encoding/block.t.cpp
index 0036175..f094460 100644
--- a/tests/unit-tests/encoding/block.t.cpp
+++ b/tests/unit-tests/encoding/block.t.cpp
@@ -473,18 +473,21 @@
 
 BOOST_AUTO_TEST_CASE(Equality)
 {
-  Block a("\x08\x00", 2);
-  Block b("\x08\x00", 2);;
+  const uint8_t one[] = {0x08, 0x00};
+  Block a(one, sizeof(one));
+  Block b(one, sizeof(one));
   BOOST_CHECK_EQUAL(a == b, true);
   BOOST_CHECK_EQUAL(a != b, false);
 
-  Block c("\x06\x00", 2);
-  Block d("\x08\x00", 2);;
+  const uint8_t two[] = {0x06, 0x00};
+  Block c(two, sizeof(two));
+  Block d(one, sizeof(one));
   BOOST_CHECK_EQUAL(c == d, false);
   BOOST_CHECK_EQUAL(c != d, true);
 
-  Block e("\x06\x00", 2);
-  Block f("\x06\x01\xcc", 3);;
+  const uint8_t three[] = {0x06, 0x01, 0xcc};
+  Block e(two, sizeof(two));
+  Block f(three, sizeof(three));
   BOOST_CHECK_EQUAL(e == f, false);
   BOOST_CHECK_EQUAL(e != f, true);
 }
diff --git a/tests/unit-tests/mgmt/dispatcher.t.cpp b/tests/unit-tests/mgmt/dispatcher.t.cpp
index b9577cb..535e8bd 100644
--- a/tests/unit-tests/mgmt/dispatcher.t.cpp
+++ b/tests/unit-tests/mgmt/dispatcher.t.cpp
@@ -304,21 +304,23 @@
 
 BOOST_AUTO_TEST_CASE(StatusDataset)
 {
-  static Block smallBlock("\x81\x01\0x01", 3);
-  static Block largeBlock = [] () -> Block {
+  const uint8_t smallBuf[] = {0x81, 0x01, 0x01};
+  const Block smallBlock(smallBuf, sizeof(smallBuf));
+  Block largeBlock;
+  {
     EncodingBuffer encoder;
     for (size_t i = 0; i < 2500; ++i) {
       encoder.prependByte(1);
     }
     encoder.prependVarNumber(2500);
     encoder.prependVarNumber(129);
-    return encoder.block();
-  }();
+    largeBlock = encoder.block();
+  }
 
   dispatcher.addStatusDataset("test/small",
                               makeTestAuthorization(),
-                              [] (const Name& prefix, const Interest& interest,
-                                  StatusDatasetContext& context) {
+                              [&smallBlock] (const Name& prefix, const Interest& interest,
+                                             StatusDatasetContext& context) {
                                 context.append(smallBlock);
                                 context.append(smallBlock);
                                 context.append(smallBlock);
@@ -327,8 +329,8 @@
 
   dispatcher.addStatusDataset("test/large",
                               makeTestAuthorization(),
-                              [] (const Name& prefix, const Interest& interest,
-                                  StatusDatasetContext& context) {
+                              [&largeBlock] (const Name& prefix, const Interest& interest,
+                                             StatusDatasetContext& context) {
                                 context.append(largeBlock);
                                 context.append(largeBlock);
                                 context.append(largeBlock);
@@ -436,8 +438,8 @@
 
 BOOST_AUTO_TEST_CASE(NotificationStream)
 {
-  static Block block("\x82\x01\x02", 3);
-
+  const uint8_t buf[] = {0x82, 0x01, 0x02};
+  const Block block(buf, sizeof(buf));
   auto post = dispatcher.addNotificationStream("test");
 
   post(block);
diff --git a/tests/unit-tests/mgmt/status-dataset-context.t.cpp b/tests/unit-tests/mgmt/status-dataset-context.t.cpp
index be7b198..5c432a7 100644
--- a/tests/unit-tests/mgmt/status-dataset-context.t.cpp
+++ b/tests/unit-tests/mgmt/status-dataset-context.t.cpp
@@ -253,13 +253,15 @@
 
 BOOST_AUTO_TEST_CASE(AppendReject)
 {
-  BOOST_CHECK_NO_THROW(context.append(Block("\x82\x01\x02", 3)));
+  const uint8_t buf[] = {0x82, 0x01, 0x02};
+  BOOST_CHECK_NO_THROW(context.append(Block(buf, sizeof(buf))));
   BOOST_CHECK_THROW(context.reject(), std::domain_error);
 }
 
 BOOST_AUTO_TEST_CASE(AppendEndReject)
 {
-  BOOST_CHECK_NO_THROW(context.append(Block("\x82\x01\x02", 3)));
+  const uint8_t buf[] = {0x82, 0x01, 0x02};
+  BOOST_CHECK_NO_THROW(context.append(Block(buf, sizeof(buf))));
   BOOST_CHECK_NO_THROW(context.end());
   BOOST_CHECK_THROW(context.reject(), std::domain_error);
 }
@@ -268,7 +270,8 @@
 {
   BOOST_CHECK_NO_THROW(context.end());
   // end, append -> error
-  BOOST_CHECK_THROW(context.append(Block("\x82\x01\x02", 3)), std::domain_error);
+  const uint8_t buf[] = {0x82, 0x01, 0x02};
+  BOOST_CHECK_THROW(context.append(Block(buf, sizeof(buf))), std::domain_error);
 }
 
 BOOST_AUTO_TEST_CASE(EndEnd)
@@ -286,7 +289,8 @@
 BOOST_AUTO_TEST_CASE(RejectAppend)
 {
   BOOST_CHECK_NO_THROW(context.reject());
-  BOOST_CHECK_THROW(context.append(Block("\x82\x01\x02", 3)), std::domain_error);
+  const uint8_t buf[] = {0x82, 0x01, 0x02};
+  BOOST_CHECK_THROW(context.append(Block(buf, sizeof(buf))), std::domain_error);
 }
 
 BOOST_AUTO_TEST_CASE(RejectEnd)
