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