From 7f851f66bef046d9facdc050604abbe423adac4a Mon Sep 17 00:00:00 2001 From: Phenom Date: Thu, 28 Sep 2017 19:24:26 +0200 Subject: [PATCH] Fix Gcc Warning in p3banlist --- libretroshare/src/services/p3banlist.cc | 15 ++++++++------- libretroshare/src/services/p3banlist.h | 10 +++++----- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/libretroshare/src/services/p3banlist.cc b/libretroshare/src/services/p3banlist.cc index c94c8cea9..6a061500c 100644 --- a/libretroshare/src/services/p3banlist.cc +++ b/libretroshare/src/services/p3banlist.cc @@ -62,13 +62,14 @@ */ RsBanList *rsBanList = NULL ; -p3BanList::p3BanList(p3ServiceControl *sc, p3NetMgr */*nm*/) : - p3Service(), mBanMtx("p3BanList"), mServiceCtrl(sc), mSentListTime(0), - mLastDhtInfoRequest(0), mIPFilteringEnabled(true), - // default number of IPs in same range to trigger a complete IP /24 filter. - mAutoRangeLimit(100), - mAutoRangeIps(false), mIPFriendGatheringEnabled(false), - mIPDHTGatheringEnabled(false) +p3BanList::p3BanList(p3ServiceControl *sc, p3NetMgr */*nm*/) + : p3Service(), mBanMtx("p3BanList"), mServiceCtrl(sc) + , mSentListTime(0), mLastDhtInfoRequest(0) + // default number of IPs in same range to trigger a complete IP /24 filter. + , mAutoRangeLimit(100), mAutoRangeIps(false) + , mIPFilteringEnabled(true) + , mIPFriendGatheringEnabled(false) + , mIPDHTGatheringEnabled(false) { addSerialType(new RsBanListSerialiser()); } const std::string BANLIST_APP_NAME = "banlist"; diff --git a/libretroshare/src/services/p3banlist.h b/libretroshare/src/services/p3banlist.h index 5a31bd1b1..5bb251b5a 100644 --- a/libretroshare/src/services/p3banlist.h +++ b/libretroshare/src/services/p3banlist.h @@ -141,22 +141,22 @@ private: int printBanSet_locked(std::ostream &out); bool isWhiteListed_locked(const sockaddr_storage &addr); + p3ServiceControl *mServiceCtrl; + //p3NetMgr *mNetMgr; time_t mSentListTime; std::map mBanSources; std::map mBanSet; std::map mBanRanges; std::map mWhiteListedRanges; - p3ServiceControl *mServiceCtrl; - //p3NetMgr *mNetMgr; time_t mLastDhtInfoRequest ; + uint32_t mAutoRangeLimit ; + bool mAutoRangeIps ; + bool mIPFilteringEnabled ; bool mIPFriendGatheringEnabled ; bool mIPDHTGatheringEnabled ; - - uint32_t mAutoRangeLimit ; - bool mAutoRangeIps ; }; #endif // SERVICE_RSBANLIST_HEADER