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
This commit is contained in:
committed by
Junxiao Shi
parent
ce81230b09
commit
db9d37edab
@@ -30,8 +30,6 @@
|
||||
|
||||
namespace nfd {
|
||||
|
||||
NFD_LOG_INIT("ConfigFile");
|
||||
|
||||
void
|
||||
ConfigFile::throwErrorOnUnknownSection(const std::string& filename,
|
||||
const std::string& sectionName,
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
|
||||
namespace nfd {
|
||||
|
||||
NFD_LOG_INIT("EthernetFactory");
|
||||
|
||||
shared_ptr<EthernetFace>
|
||||
EthernetFactory::createMulticastFace(const NetworkInterfaceInfo& interface,
|
||||
const ethernet::Address &address)
|
||||
|
||||
@@ -29,8 +29,6 @@ namespace nfd {
|
||||
|
||||
using namespace boost::asio;
|
||||
|
||||
NFD_LOG_INIT("WebSocketFactory");
|
||||
|
||||
WebSocketFactory::WebSocketFactory(const std::string& defaultPort)
|
||||
: m_defaultPort(defaultPort)
|
||||
{
|
||||
|
||||
@@ -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 @@ ChannelStatusPublisher::ChannelStatusPublisher(const FactoryMap& factories,
|
||||
: SegmentPublisher(face, prefix, keyChain)
|
||||
, m_factories(factories)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
ChannelStatusPublisher::~ChannelStatusPublisher()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
size_t
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 @@ FaceStatusPublisher::FaceStatusPublisher(const FaceTable& faceTable,
|
||||
: SegmentPublisher(face, prefix, keyChain)
|
||||
, m_faceTable(faceTable)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
FaceStatusPublisher::~FaceStatusPublisher()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
size_t
|
||||
|
||||
@@ -79,9 +79,9 @@ FibEnumerationPublisher::generate(ndn::EncodingBuffer& outBuffer)
|
||||
|
||||
totalLength += fibEntryLength;
|
||||
}
|
||||
|
||||
NFD_LOG_DEBUG("generate: Total length = " << totalLength);
|
||||
return totalLength;
|
||||
}
|
||||
|
||||
|
||||
} // namespace nfd
|
||||
|
||||
@@ -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 @@ StrategyChoicePublisher::StrategyChoicePublisher(const StrategyChoice& strategyC
|
||||
: SegmentPublisher(face, prefix, keyChain)
|
||||
, m_strategyChoice(strategyChoice)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
StrategyChoicePublisher::~StrategyChoicePublisher()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
size_t
|
||||
|
||||
@@ -33,8 +33,6 @@
|
||||
namespace nfd {
|
||||
namespace tests {
|
||||
|
||||
NFD_LOG_INIT("ConfigFileTest");
|
||||
|
||||
BOOST_FIXTURE_TEST_SUITE(TestConfigFile, BaseFixture)
|
||||
|
||||
// a
|
||||
|
||||
@@ -28,9 +28,6 @@
|
||||
|
||||
#include "channel-status-common.hpp"
|
||||
|
||||
#include "core/logger.hpp"
|
||||
NFD_LOG_INIT("TestChannelStatusPublisher");
|
||||
|
||||
namespace nfd {
|
||||
namespace tests {
|
||||
|
||||
@@ -91,8 +88,6 @@ public:
|
||||
|
||||
ndn::nfd::ChannelStatus entry(*i);
|
||||
|
||||
NFD_LOG_DEBUG("looking for channelstatus " << entry.getLocalUri());
|
||||
|
||||
std::map<std::string, ndn::nfd::ChannelStatus>::const_iterator expectedEntryPos =
|
||||
m_expectedEntries.find(entry.getLocalUri());
|
||||
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
namespace nfd {
|
||||
namespace tests {
|
||||
|
||||
NFD_LOG_INIT("FaceStatusPublisherTest");
|
||||
|
||||
BOOST_FIXTURE_TEST_SUITE(MgmtFaceStatusPublisher, FaceStatusPublisherFixture)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(EncodingDecoding)
|
||||
|
||||
@@ -38,8 +38,6 @@
|
||||
namespace nfd {
|
||||
namespace tests {
|
||||
|
||||
NFD_LOG_INIT("TestFibEnumerationPublisher");
|
||||
|
||||
BOOST_FIXTURE_TEST_SUITE(MgmtFibEnumerationPublisher, FibEnumerationPublisherFixture)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TestFibEnumerationPublisher)
|
||||
|
||||
Reference in New Issue
Block a user