Add -Wextra-semi -Wundefined-func-template to the default CXXFLAGS

And fix the resulting compilation errors.

Change-Id: I16f679836a0cf2a3ff5dfcf6f6b67bfbfe4cdbd7
Refs: #4248
diff --git a/src/lp/cache-policy.cpp b/src/lp/cache-policy.cpp
index 37dad5e..aea7d05 100644
--- a/src/lp/cache-policy.cpp
+++ b/src/lp/cache-policy.cpp
@@ -59,19 +59,15 @@
   if (m_policy == CachePolicyType::NONE) {
     BOOST_THROW_EXCEPTION(Error("CachePolicyType must be set"));
   }
+
   size_t length = 0;
-  length += prependNonNegativeIntegerBlock(encoder, tlv::CachePolicyType,
-                                           static_cast<uint32_t>(m_policy));
+  length += prependNonNegativeIntegerBlock(encoder, tlv::CachePolicyType, static_cast<uint32_t>(m_policy));
   length += encoder.prependVarNumber(length);
   length += encoder.prependVarNumber(tlv::CachePolicy);
   return length;
 }
 
-template size_t
-CachePolicy::wireEncode<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>& encoder) const;
-
-template size_t
-CachePolicy::wireEncode<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>& encoder) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(CachePolicy);
 
 const Block&
 CachePolicy::wireEncode() const
diff --git a/src/lp/cache-policy.hpp b/src/lp/cache-policy.hpp
index 45b9493..f35dc06 100644
--- a/src/lp/cache-policy.hpp
+++ b/src/lp/cache-policy.hpp
@@ -103,6 +103,8 @@
   mutable Block m_wire;
 };
 
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(CachePolicy);
+
 } // namespace lp
 } // namespace ndn
 
diff --git a/src/lp/nack-header.cpp b/src/lp/nack-header.cpp
index 9f3157c..3bbc985 100644
--- a/src/lp/nack-header.cpp
+++ b/src/lp/nack-header.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).
  *
@@ -61,18 +61,13 @@
 NackHeader::wireEncode(EncodingImpl<TAG>& encoder) const
 {
   size_t length = 0;
-  length += prependNonNegativeIntegerBlock(encoder, tlv::NackReason,
-                                           static_cast<uint32_t>(m_reason));
+  length += prependNonNegativeIntegerBlock(encoder, tlv::NackReason, static_cast<uint32_t>(m_reason));
   length += encoder.prependVarNumber(length);
   length += encoder.prependVarNumber(tlv::Nack);
   return length;
 }
 
-template size_t
-NackHeader::wireEncode<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>& encoder) const;
-
-template size_t
-NackHeader::wireEncode<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>& encoder) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(NackHeader);
 
 const Block&
 NackHeader::wireEncode() const
diff --git a/src/lp/nack-header.hpp b/src/lp/nack-header.hpp
index 4544f54..0c034f4 100644
--- a/src/lp/nack-header.hpp
+++ b/src/lp/nack-header.hpp
@@ -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).
  *
@@ -87,7 +87,9 @@
   mutable Block m_wire;
 };
 
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(NackHeader);
+
 } // namespace lp
 } // namespace ndn
 
-#endif // NDN_CXX_LP_NACK_HEADER_HPP
\ No newline at end of file
+#endif // NDN_CXX_LP_NACK_HEADER_HPP