Stop using deprecated Block constructor

Change-Id: I7ea18187df50c81879a1f9d990d2ca1c902ecf84
diff --git a/README-dev.md b/README-dev.md
index 60dc71f..eb421cc 100644
--- a/README-dev.md
+++ b/README-dev.md
@@ -14,8 +14,8 @@
 boilerplate to be put into all `.hpp` and `.cpp` files:
 
     /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-    /**
-     * Copyright (c) 2014-2017,  Copyright Holder(s)
+    /*
+     * Copyright (c) [Year(s)],  [Copyright Holder(s)].
      *
      * This file is part of NDN repo-ng (Next generation of NDN repository).
      * See AUTHORS.md for complete list of repo-ng authors and contributors.
diff --git a/src/storage/repo-storage.cpp b/src/storage/repo-storage.cpp
index 49873d7..1828eb9 100644
--- a/src/storage/repo-storage.cpp
+++ b/src/storage/repo-storage.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.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
@@ -18,7 +18,8 @@
  */
 
 #include "repo-storage.hpp"
-#include "../../build/src/config.hpp"
+#include "config.hpp"
+
 #include <istream>
 
 namespace repo {
diff --git a/src/storage/sqlite-storage.cpp b/src/storage/sqlite-storage.cpp
index 35fa642..42739c3 100644
--- a/src/storage/sqlite-storage.cpp
+++ b/src/storage/sqlite-storage.cpp
@@ -18,7 +18,7 @@
  */
 
 #include "sqlite-storage.hpp"
-#include "../../build/src/config.hpp"
+#include "config.hpp"
 #include "index.hpp"
 
 #include <ndn-cxx/util/sha256.hpp>
@@ -103,16 +103,16 @@
     if (rc == SQLITE_ROW) {
 
       ItemMeta item;
-      item.fullName.wireDecode(Block(sqlite3_column_blob(m_stmt, 1),
+      item.fullName.wireDecode(Block(reinterpret_cast<const uint8_t*>(sqlite3_column_blob(m_stmt, 1)),
                                      sqlite3_column_bytes(m_stmt, 1)));
       item.id = sqlite3_column_int(m_stmt, 0);
-      item.keyLocatorHash = make_shared<const ndn::Buffer>
-        (ndn::Buffer(sqlite3_column_blob(m_stmt, 3), sqlite3_column_bytes(m_stmt, 3)));
+      item.keyLocatorHash = make_shared<const ndn::Buffer>(sqlite3_column_blob(m_stmt, 3),
+                                                           sqlite3_column_bytes(m_stmt, 3));
 
       try {
         f(item);
       }
-      catch (...){
+      catch (...) {
         sqlite3_finalize(m_stmt);
         throw;
       }
@@ -176,7 +176,7 @@
   if (result == SQLITE_OK) {
     rc = sqlite3_step(insertStmt);
     if (rc == SQLITE_CONSTRAINT) {
-      std::cerr << "Insert  failed" << std::endl;
+      std::cerr << "Insert failed" << std::endl;
       sqlite3_finalize(insertStmt);
       BOOST_THROW_EXCEPTION(Error("Insert failed"));
      }
@@ -237,14 +237,14 @@
     if (sqlite3_bind_int64(queryStmt, 1, id) == SQLITE_OK) {
       rc = sqlite3_step(queryStmt);
       if (rc == SQLITE_ROW) {
-        shared_ptr<Data> data(new Data());
-        data->wireDecode(Block(sqlite3_column_blob(queryStmt, 2),
-                              sqlite3_column_bytes(queryStmt, 2)));
+        auto data = make_shared<Data>();
+        data->wireDecode(Block(reinterpret_cast<const uint8_t*>(sqlite3_column_blob(queryStmt, 2)),
+                               sqlite3_column_bytes(queryStmt, 2)));
         sqlite3_finalize(queryStmt);
         return data;
       }
       else if (rc == SQLITE_DONE) {
-        return shared_ptr<Data>();
+        return nullptr;
       }
       else {
         std::cerr << "Database query failure rc:" << rc << std::endl;
@@ -264,7 +264,7 @@
     std::cerr << "select statement prepared failed" << std::endl;
     BOOST_THROW_EXCEPTION(Error("select statement prepared failed"));
   }
-  return shared_ptr<Data>();
+  return nullptr;
 }
 
 int64_t
diff --git a/tools/repo-ng-ls.cpp b/tools/repo-ng-ls.cpp
index 1dc4410..1ce0b28 100644
--- a/tools/repo-ng-ls.cpp
+++ b/tools/repo-ng-ls.cpp
@@ -32,10 +32,9 @@
 
 using std::string;
 
-void
+static void
 printUsage(const char* programName)
 {
-
   std::cout
     << "Usage:\n"
     << "  " << programName << " [-c <path/to/repo-ng.conf>] [-n] [-h]\n"
@@ -48,7 +47,6 @@
     << "  -c: set config file path\n"
     << "  -n: do not show implicit digest\n"
     << std::endl;
-  ;
 }
 
 class RepoEnumerator
@@ -136,7 +134,7 @@
     rc = sqlite3_step(m_stmt);
     if (rc == SQLITE_ROW) {
       Name name;
-      name.wireDecode(Block(sqlite3_column_blob(m_stmt, 1),
+      name.wireDecode(Block(reinterpret_cast<const uint8_t*>(sqlite3_column_blob(m_stmt, 1)),
                             sqlite3_column_bytes(m_stmt, 1)));
       try {
         if (showImplicitDigest) {