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/mgmt/nfd/channel-status.cpp b/src/mgmt/nfd/channel-status.cpp
index e6e53f4..5fd93b1 100644
--- a/src/mgmt/nfd/channel-status.cpp
+++ b/src/mgmt/nfd/channel-status.cpp
@@ -47,11 +47,7 @@
   return totalLength;
 }
 
-template size_t
-ChannelStatus::wireEncode<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>&) const;
-
-template size_t
-ChannelStatus::wireEncode<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>&) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ChannelStatus);
 
 const Block&
 ChannelStatus::wireEncode() const
diff --git a/src/mgmt/nfd/channel-status.hpp b/src/mgmt/nfd/channel-status.hpp
index 04b3ed6..0345550 100644
--- a/src/mgmt/nfd/channel-status.hpp
+++ b/src/mgmt/nfd/channel-status.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -76,6 +76,8 @@
   mutable Block m_wire;
 };
 
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(ChannelStatus);
+
 bool
 operator==(const ChannelStatus& a, const ChannelStatus& b);
 
diff --git a/src/mgmt/nfd/control-parameters.cpp b/src/mgmt/nfd/control-parameters.cpp
index 465482f..61fb823 100644
--- a/src/mgmt/nfd/control-parameters.cpp
+++ b/src/mgmt/nfd/control-parameters.cpp
@@ -92,11 +92,7 @@
   return totalLength;
 }
 
-template size_t
-ControlParameters::wireEncode<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>&) const;
-
-template size_t
-ControlParameters::wireEncode<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>&) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ControlParameters);
 
 Block
 ControlParameters::wireEncode() const
diff --git a/src/mgmt/nfd/control-parameters.hpp b/src/mgmt/nfd/control-parameters.hpp
index c4d2167..791813f 100644
--- a/src/mgmt/nfd/control-parameters.hpp
+++ b/src/mgmt/nfd/control-parameters.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -484,6 +484,8 @@
   mutable Block m_wire;
 };
 
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(ControlParameters);
+
 std::ostream&
 operator<<(std::ostream& os, const ControlParameters& parameters);
 
diff --git a/src/mgmt/nfd/face-event-notification.cpp b/src/mgmt/nfd/face-event-notification.cpp
index 79a94f2..653a9d9 100644
--- a/src/mgmt/nfd/face-event-notification.cpp
+++ b/src/mgmt/nfd/face-event-notification.cpp
@@ -61,11 +61,7 @@
   return totalLength;
 }
 
-template size_t
-FaceEventNotification::wireEncode<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>& block) const;
-
-template size_t
-FaceEventNotification::wireEncode<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>& block) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(FaceEventNotification);
 
 const Block&
 FaceEventNotification::wireEncode() const
diff --git a/src/mgmt/nfd/face-event-notification.hpp b/src/mgmt/nfd/face-event-notification.hpp
index 1c6ae4c..c933fbf 100644
--- a/src/mgmt/nfd/face-event-notification.hpp
+++ b/src/mgmt/nfd/face-event-notification.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -70,6 +70,8 @@
   FaceEventKind m_kind;
 };
 
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(FaceEventNotification);
+
 bool
 operator==(const FaceEventNotification& a, const FaceEventNotification& b);
 
diff --git a/src/mgmt/nfd/face-query-filter.cpp b/src/mgmt/nfd/face-query-filter.cpp
index 6bde1d4..5204aa9 100644
--- a/src/mgmt/nfd/face-query-filter.cpp
+++ b/src/mgmt/nfd/face-query-filter.cpp
@@ -83,11 +83,7 @@
   return totalLength;
 }
 
-template size_t
-FaceQueryFilter::wireEncode<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>&) const;
-
-template size_t
-FaceQueryFilter::wireEncode<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>&) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(FaceQueryFilter);
 
 const Block&
 FaceQueryFilter::wireEncode() const
diff --git a/src/mgmt/nfd/face-query-filter.hpp b/src/mgmt/nfd/face-query-filter.hpp
index b0e9e5d..4b35293 100644
--- a/src/mgmt/nfd/face-query-filter.hpp
+++ b/src/mgmt/nfd/face-query-filter.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -218,6 +218,8 @@
   mutable Block m_wire;
 };
 
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(FaceQueryFilter);
+
 bool
 operator==(const FaceQueryFilter& a, const FaceQueryFilter& b);
 
diff --git a/src/mgmt/nfd/face-status.cpp b/src/mgmt/nfd/face-status.cpp
index 1cfc741..360865a 100644
--- a/src/mgmt/nfd/face-status.cpp
+++ b/src/mgmt/nfd/face-status.cpp
@@ -79,11 +79,7 @@
   return totalLength;
 }
 
-template size_t
-FaceStatus::wireEncode<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>& block) const;
-
-template size_t
-FaceStatus::wireEncode<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>& block) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(FaceStatus);
 
 const Block&
 FaceStatus::wireEncode() const
diff --git a/src/mgmt/nfd/face-status.hpp b/src/mgmt/nfd/face-status.hpp
index d34973a..aa7accb 100644
--- a/src/mgmt/nfd/face-status.hpp
+++ b/src/mgmt/nfd/face-status.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -161,6 +161,8 @@
   uint64_t m_nOutBytes;
 };
 
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(FaceStatus);
+
 bool
 operator==(const FaceStatus& a, const FaceStatus& b);
 
diff --git a/src/mgmt/nfd/fib-entry.cpp b/src/mgmt/nfd/fib-entry.cpp
index db3b69f..ef47f6a 100644
--- a/src/mgmt/nfd/fib-entry.cpp
+++ b/src/mgmt/nfd/fib-entry.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -74,11 +74,7 @@
   return totalLength;
 }
 
-template size_t
-NextHopRecord::wireEncode<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>& block) const;
-
-template size_t
-NextHopRecord::wireEncode<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>& block) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(NextHopRecord);
 
 const Block&
 NextHopRecord::wireEncode() const
@@ -190,11 +186,7 @@
   return totalLength;
 }
 
-template size_t
-FibEntry::wireEncode<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>& block) const;
-
-template size_t
-FibEntry::wireEncode<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>& block) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(FibEntry);
 
 const Block&
 FibEntry::wireEncode() const
diff --git a/src/mgmt/nfd/fib-entry.hpp b/src/mgmt/nfd/fib-entry.hpp
index fa609ef..d91f651 100644
--- a/src/mgmt/nfd/fib-entry.hpp
+++ b/src/mgmt/nfd/fib-entry.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -84,6 +84,8 @@
   mutable Block m_wire;
 };
 
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(NextHopRecord);
+
 bool
 operator==(const NextHopRecord& a, const NextHopRecord& b);
 
@@ -165,6 +167,8 @@
   mutable Block m_wire;
 };
 
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(FibEntry);
+
 bool
 operator==(const FibEntry& a, const FibEntry& b);
 
diff --git a/src/mgmt/nfd/forwarder-status.cpp b/src/mgmt/nfd/forwarder-status.cpp
index 50eac63..27f506e 100644
--- a/src/mgmt/nfd/forwarder-status.cpp
+++ b/src/mgmt/nfd/forwarder-status.cpp
@@ -78,11 +78,7 @@
   return totalLength;
 }
 
-template size_t
-ForwarderStatus::wireEncode<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>&) const;
-
-template size_t
-ForwarderStatus::wireEncode<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>&) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ForwarderStatus);
 
 const Block&
 ForwarderStatus::wireEncode() const
diff --git a/src/mgmt/nfd/forwarder-status.hpp b/src/mgmt/nfd/forwarder-status.hpp
index d751165..d493048 100644
--- a/src/mgmt/nfd/forwarder-status.hpp
+++ b/src/mgmt/nfd/forwarder-status.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -219,6 +219,8 @@
   mutable Block m_wire;
 };
 
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(ForwarderStatus);
+
 bool
 operator==(const ForwarderStatus& a, const ForwarderStatus& b);
 
diff --git a/src/mgmt/nfd/rib-entry.cpp b/src/mgmt/nfd/rib-entry.cpp
index 475af15..c4c2d82 100644
--- a/src/mgmt/nfd/rib-entry.cpp
+++ b/src/mgmt/nfd/rib-entry.cpp
@@ -118,11 +118,7 @@
   return totalLength;
 }
 
-template size_t
-Route::wireEncode<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>& block) const;
-
-template size_t
-Route::wireEncode<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>& block) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(Route);
 
 const Block&
 Route::wireEncode() const
@@ -269,11 +265,7 @@
   return totalLength;
 }
 
-template size_t
-RibEntry::wireEncode<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>& block) const;
-
-template size_t
-RibEntry::wireEncode<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>& block) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(RibEntry);
 
 const Block&
 RibEntry::wireEncode() const
diff --git a/src/mgmt/nfd/rib-entry.hpp b/src/mgmt/nfd/rib-entry.hpp
index e515e64..1ea73d3 100644
--- a/src/mgmt/nfd/rib-entry.hpp
+++ b/src/mgmt/nfd/rib-entry.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -131,6 +131,8 @@
   mutable Block m_wire;
 };
 
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(Route);
+
 bool
 operator==(const Route& a, const Route& b);
 
@@ -217,6 +219,8 @@
   mutable Block m_wire;
 };
 
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(RibEntry);
+
 bool
 operator==(const RibEntry& a, const RibEntry& b);
 
diff --git a/src/mgmt/nfd/strategy-choice.cpp b/src/mgmt/nfd/strategy-choice.cpp
index 4c9ce37..e0496d6 100644
--- a/src/mgmt/nfd/strategy-choice.cpp
+++ b/src/mgmt/nfd/strategy-choice.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -51,11 +51,7 @@
   return totalLength;
 }
 
-template size_t
-StrategyChoice::wireEncode<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>&) const;
-
-template size_t
-StrategyChoice::wireEncode<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>&) const;
+NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(StrategyChoice);
 
 const Block&
 StrategyChoice::wireEncode() const
diff --git a/src/mgmt/nfd/strategy-choice.hpp b/src/mgmt/nfd/strategy-choice.hpp
index ba840f0..55871bb 100644
--- a/src/mgmt/nfd/strategy-choice.hpp
+++ b/src/mgmt/nfd/strategy-choice.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * 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,6 +87,8 @@
   mutable Block m_wire;
 };
 
+NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(StrategyChoice);
+
 bool
 operator==(const StrategyChoice& a, const StrategyChoice& b);