net+util: fix build with gcc-7
Introduce an NDN_CXX_FALLTHROUGH macro to simplify
annotating switch cases that fall through.
Update code-style to recommend using NDN_CXX_FALLTHROUGH.
Change-Id: I80e4ff8d16a09f6ec9343f0480bc57ae0fcd1be4
diff --git a/src/net/address-converter.cpp b/src/net/address-converter.cpp
index b6f2de2..d84f757 100644
--- a/src/net/address-converter.cpp
+++ b/src/net/address-converter.cpp
@@ -89,7 +89,7 @@
if (!ec && addr.is_v6() && addr.to_v6().is_link_local()) {
return {addr, parseResult[1]};
}
- // Fallthrough, if the presence of % is invalid set ec to invalid_argument
+ NDN_CXX_FALLTHROUGH;
default:
ec = boost::asio::error::invalid_argument;
return {};