Fix several "defined but not used" warnings with gcc-5
GCC 5 is able to prove that in some translation units the static Logger
instance is defined but never used, and generates an unused variable
warning for each one of them. These warnings become fatal errors when
building in debug mode, due to -Werror.
Silence the compiler by not declaring the unused variables.
refs #2767
Change-Id: Icacc579d917d660582221ef090954ec827f46149
diff --git a/daemon/mgmt/channel-status-publisher.cpp b/daemon/mgmt/channel-status-publisher.cpp
index 8abe2fb..bb14879 100644
--- a/daemon/mgmt/channel-status-publisher.cpp
+++ b/daemon/mgmt/channel-status-publisher.cpp
@@ -24,8 +24,6 @@
*/
#include "channel-status-publisher.hpp"
-
-#include "core/logger.hpp"
#include "face/protocol-factory.hpp"
#include "face/channel.hpp"
@@ -33,9 +31,6 @@
namespace nfd {
-NFD_LOG_INIT("ChannelStatusPublisher");
-
-
ChannelStatusPublisher::ChannelStatusPublisher(const FactoryMap& factories,
AppFace& face,
const Name& prefix,
@@ -43,13 +38,10 @@
: SegmentPublisher(face, prefix, keyChain)
, m_factories(factories)
{
-
}
-
ChannelStatusPublisher::~ChannelStatusPublisher()
{
-
}
size_t
diff --git a/daemon/mgmt/face-query-status-publisher.cpp b/daemon/mgmt/face-query-status-publisher.cpp
index d208087..59cf513 100644
--- a/daemon/mgmt/face-query-status-publisher.cpp
+++ b/daemon/mgmt/face-query-status-publisher.cpp
@@ -24,16 +24,12 @@
**/
#include "face-query-status-publisher.hpp"
-#include "core/logger.hpp"
-#include <boost/range/adaptor/reversed.hpp>
+#include <boost/range/adaptor/reversed.hpp>
#include <ndn-cxx/management/nfd-face-status.hpp>
namespace nfd {
-NFD_LOG_INIT("FaceQueryStatusPublisher");
-
-
FaceQueryStatusPublisher::FaceQueryStatusPublisher(const FaceTable& faceTable,
AppFace& face,
const Name& prefix,
diff --git a/daemon/mgmt/face-status-publisher.cpp b/daemon/mgmt/face-status-publisher.cpp
index 759f9ce..ff061fa 100644
--- a/daemon/mgmt/face-status-publisher.cpp
+++ b/daemon/mgmt/face-status-publisher.cpp
@@ -23,17 +23,13 @@
**/
#include "face-status-publisher.hpp"
-#include "core/logger.hpp"
#include "fw/face-table.hpp"
-#include <boost/range/adaptor/reversed.hpp>
+#include <boost/range/adaptor/reversed.hpp>
#include <ndn-cxx/management/nfd-face-status.hpp>
namespace nfd {
-NFD_LOG_INIT("FaceStatusPublisher");
-
-
FaceStatusPublisher::FaceStatusPublisher(const FaceTable& faceTable,
AppFace& face,
const Name& prefix,
@@ -41,13 +37,10 @@
: SegmentPublisher(face, prefix, keyChain)
, m_faceTable(faceTable)
{
-
}
-
FaceStatusPublisher::~FaceStatusPublisher()
{
-
}
size_t
diff --git a/daemon/mgmt/fib-enumeration-publisher.cpp b/daemon/mgmt/fib-enumeration-publisher.cpp
index b7bad51..5123a58 100644
--- a/daemon/mgmt/fib-enumeration-publisher.cpp
+++ b/daemon/mgmt/fib-enumeration-publisher.cpp
@@ -79,9 +79,9 @@
totalLength += fibEntryLength;
}
+
NFD_LOG_DEBUG("generate: Total length = " << totalLength);
return totalLength;
}
-
} // namespace nfd
diff --git a/daemon/mgmt/strategy-choice-publisher.cpp b/daemon/mgmt/strategy-choice-publisher.cpp
index 163ac3a..8db7124 100644
--- a/daemon/mgmt/strategy-choice-publisher.cpp
+++ b/daemon/mgmt/strategy-choice-publisher.cpp
@@ -24,16 +24,12 @@
**/
#include "strategy-choice-publisher.hpp"
-#include "core/logger.hpp"
#include "table/strategy-choice.hpp"
#include <ndn-cxx/management/nfd-strategy-choice.hpp>
namespace nfd {
-NFD_LOG_INIT("StrategyChoicePublisher");
-
-
StrategyChoicePublisher::StrategyChoicePublisher(const StrategyChoice& strategyChoice,
AppFace& face,
const Name& prefix,
@@ -41,12 +37,10 @@
: SegmentPublisher(face, prefix, keyChain)
, m_strategyChoice(strategyChoice)
{
-
}
StrategyChoicePublisher::~StrategyChoicePublisher()
{
-
}
size_t