mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 23:49:35 -05:00
Merge pull request #2542 from thunder2/warnings1
Removed compiler warnings in libretroshare
This commit is contained in:
commit
fd5a008be7
@ -151,6 +151,10 @@ int p3BitDht::setRelayMode(RsDhtRelayMode mode)
|
|||||||
pushRelayServers();
|
pushRelayServers();
|
||||||
mUdpBitDht->setDhtMode(BITDHT_MODE_RELAYSERVERS_SERVER);
|
mUdpBitDht->setDhtMode(BITDHT_MODE_RELAYSERVERS_SERVER);
|
||||||
break;
|
break;
|
||||||
|
case RsDhtRelayMode::ENABLED:
|
||||||
|
case RsDhtRelayMode::DISABLED:
|
||||||
|
case RsDhtRelayMode::MASK:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -657,7 +657,6 @@ bool ftController::completeFile(const RsFileHash& hash)
|
|||||||
uint32_t period = 0;
|
uint32_t period = 0;
|
||||||
TransferRequestFlags flags ;
|
TransferRequestFlags flags ;
|
||||||
TransferRequestFlags extraflags ;
|
TransferRequestFlags extraflags ;
|
||||||
uint32_t completeCount = 0;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
RS_STACK_MUTEX(ctrlMutex);
|
RS_STACK_MUTEX(ctrlMutex);
|
||||||
@ -780,7 +779,6 @@ bool ftController::completeFile(const RsFileHash& hash)
|
|||||||
|
|
||||||
/* switch map */
|
/* switch map */
|
||||||
mCompleted[fc->mHash] = fc;
|
mCompleted[fc->mHash] = fc;
|
||||||
completeCount = mCompleted.size();
|
|
||||||
|
|
||||||
mDownloads.erase(it);
|
mDownloads.erase(it);
|
||||||
|
|
||||||
|
@ -2049,6 +2049,10 @@ bool ftServer::receiveSearchRequest(
|
|||||||
return RsServiceSerializer::serialise(
|
return RsServiceSerializer::serialise(
|
||||||
&resIt, searchResultData, &searchResultDataLen );
|
&resIt, searchResultData, &searchResultDataLen );
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
(void) searchRequestData;
|
||||||
|
(void) searchRequestDataLen;
|
||||||
|
(void) maxAllowsHits;
|
||||||
#endif // def RS_DEEP_FILES_INDEX
|
#endif // def RS_DEEP_FILES_INDEX
|
||||||
|
|
||||||
searchResultData = nullptr;
|
searchResultData = nullptr;
|
||||||
|
@ -512,6 +512,9 @@ void p3GRouter::receiveTurtleData(const RsTurtleGenericTunnelItem *gitem, const
|
|||||||
std::cerr << " Received data for hash : " << hash << std::endl;
|
std::cerr << " Received data for hash : " << hash << std::endl;
|
||||||
std::cerr << " Virtual peer id : " << virtual_peer_id << std::endl;
|
std::cerr << " Virtual peer id : " << virtual_peer_id << std::endl;
|
||||||
std::cerr << " Direction : " << direction << std::endl;
|
std::cerr << " Direction : " << direction << std::endl;
|
||||||
|
#else
|
||||||
|
(void) hash;
|
||||||
|
(void) direction;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// turtle data is received.
|
// turtle data is received.
|
||||||
|
@ -1186,6 +1186,7 @@ bool RsGenExchange::checkAuthenFlag(const PrivacyBitPos& pos, const uint8_t& fla
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TO_REMOVE
|
||||||
static void addMessageChanged(std::map<RsGxsGroupId, std::set<RsGxsMessageId> > &msgs, const std::map<RsGxsGroupId, std::set<RsGxsMessageId> > &msgChanged)
|
static void addMessageChanged(std::map<RsGxsGroupId, std::set<RsGxsMessageId> > &msgs, const std::map<RsGxsGroupId, std::set<RsGxsMessageId> > &msgChanged)
|
||||||
{
|
{
|
||||||
if (msgs.empty()) {
|
if (msgs.empty()) {
|
||||||
@ -1203,7 +1204,6 @@ static void addMessageChanged(std::map<RsGxsGroupId, std::set<RsGxsMessageId> >
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TO_REMOVE
|
|
||||||
void RsGenExchange::receiveChanges(std::vector<RsGxsNotify*>& changes)
|
void RsGenExchange::receiveChanges(std::vector<RsGxsNotify*>& changes)
|
||||||
{
|
{
|
||||||
std::cerr << "*********************************** RsGenExchange::receiveChanges()" << std::endl;
|
std::cerr << "*********************************** RsGenExchange::receiveChanges()" << std::endl;
|
||||||
@ -1780,7 +1780,7 @@ void RsGenExchange::receiveNewMessages(const std::vector<RsNxsMsg *>& messages)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RsGenExchange::receiveDistantSearchResults(TurtleRequestId id,const RsGxsGroupId &grpId)
|
void RsGenExchange::receiveDistantSearchResults(TurtleRequestId id,const RsGxsGroupId &/*grpId*/)
|
||||||
{
|
{
|
||||||
std::cerr << __PRETTY_FUNCTION__ << " received result for request " << std::hex << id << std::dec << ": this method should be overloaded in the client service, but it is not. This is a bug!" << std::endl;
|
std::cerr << __PRETTY_FUNCTION__ << " received result for request " << std::hex << id << std::dec << ": this method should be overloaded in the client service, but it is not. This is a bug!" << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -4277,6 +4277,9 @@ bool RsGxsNetService::locked_checkResendingOfUpdates(const RsPeerId& pid,const R
|
|||||||
{
|
{
|
||||||
#ifdef NXS_NET_DEBUG_0
|
#ifdef NXS_NET_DEBUG_0
|
||||||
GXSNETDEBUG_PG(pid,grpId) << "(II) peer " << pid << " already sent the same TS " << (long int)now-(long int)rec.mTs << " secs ago for that group ID. Will not send msg list again for a while to prevent clogging..." << std::endl;
|
GXSNETDEBUG_PG(pid,grpId) << "(II) peer " << pid << " already sent the same TS " << (long int)now-(long int)rec.mTs << " secs ago for that group ID. Will not send msg list again for a while to prevent clogging..." << std::endl;
|
||||||
|
#else
|
||||||
|
(void) pid;
|
||||||
|
(void) grpId;
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -4439,7 +4442,9 @@ void RsGxsNetService::handleRecvSyncMessage(RsNxsSyncMsgReqItem *item,bool item_
|
|||||||
uint32_t transN = locked_getTransactionId();
|
uint32_t transN = locked_getTransactionId();
|
||||||
RsGxsCircleId should_encrypt_to_this_circle_id ;
|
RsGxsCircleId should_encrypt_to_this_circle_id ;
|
||||||
|
|
||||||
|
#ifndef RS_GXS_SEND_ALL
|
||||||
rstime_t now = time(NULL) ;
|
rstime_t now = time(NULL) ;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef RS_GXS_SEND_ALL
|
#ifndef RS_GXS_SEND_ALL
|
||||||
uint32_t max_send_delay = locked_getGrpConfig(item->grpId).msg_req_delay; // we should use "sync" but there's only one variable used in the GUI: the req one.
|
uint32_t max_send_delay = locked_getGrpConfig(item->grpId).msg_req_delay; // we should use "sync" but there's only one variable used in the GUI: the req one.
|
||||||
|
@ -340,7 +340,7 @@ bool RsGxsIntegrityCheck::check(uint16_t service_type, RsGixs *mgixs, RsGeneralD
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool RsGxsSinglePassIntegrityCheck::check(
|
bool RsGxsSinglePassIntegrityCheck::check(
|
||||||
uint16_t service_type, RsGixs* mgixs, RsGeneralDataService* mds,
|
uint16_t /*service_type*/, RsGixs* /*mgixs*/, RsGeneralDataService* mds,
|
||||||
std::vector<RsGxsGroupId>& grpsToDel, GxsMsgReq& msgsToDel )
|
std::vector<RsGxsGroupId>& grpsToDel, GxsMsgReq& msgsToDel )
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_GXSUTIL
|
#ifdef DEBUG_GXSUTIL
|
||||||
|
@ -273,7 +273,6 @@ int inet_aton(const char *name, struct in_addr *addr)
|
|||||||
#ifdef WINDOWS_SYS
|
#ifdef WINDOWS_SYS
|
||||||
# include <winsock2.h>
|
# include <winsock2.h>
|
||||||
# include <iphlpapi.h>
|
# include <iphlpapi.h>
|
||||||
# pragma comment(lib, "IPHLPAPI.lib")
|
|
||||||
#elif defined(__ANDROID__) && __ANDROID_API__ < 24
|
#elif defined(__ANDROID__) && __ANDROID_API__ < 24
|
||||||
/// @See: android_ifaddrs/README.adoc
|
/// @See: android_ifaddrs/README.adoc
|
||||||
# include "rs_android/ifaddrs-android.h"
|
# include "rs_android/ifaddrs-android.h"
|
||||||
|
@ -236,7 +236,7 @@ bool p3GxsCircles::createCircle(
|
|||||||
|
|
||||||
bool p3GxsCircles::checkCircleParamConsistency( const std::string& circleName, RsGxsCircleType circleType,
|
bool p3GxsCircles::checkCircleParamConsistency( const std::string& circleName, RsGxsCircleType circleType,
|
||||||
const RsGxsCircleId& restrictedId,
|
const RsGxsCircleId& restrictedId,
|
||||||
const RsGxsId& authorId, const std::set<RsGxsId>& gxsIdMembers,
|
const RsGxsId& /*authorId*/, const std::set<RsGxsId>& gxsIdMembers,
|
||||||
const std::set<RsPgpId>& localMembers ) const
|
const std::set<RsPgpId>& localMembers ) const
|
||||||
{
|
{
|
||||||
if(circleName.empty())
|
if(circleName.empty())
|
||||||
|
@ -52,7 +52,7 @@ void TorControlCommand::onFinished(int statusCode)
|
|||||||
mFinished(this);
|
mFinished(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TorControlCommand::onDataLine(const ByteArray &data)
|
void TorControlCommand::onDataLine(const ByteArray &/*data*/)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,6 @@ bool RetroDb::execSQL(const std::string &query){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32_t delta = 3;
|
|
||||||
rstime_t stamp = time(NULL);
|
rstime_t stamp = time(NULL);
|
||||||
bool timeOut = false, ok = false;
|
bool timeOut = false, ok = false;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#define PASS_MAX 512
|
#define PASS_MAX 512
|
||||||
|
|
||||||
namespace RsUtil {
|
namespace RsUtil {
|
||||||
std::string rs_getpass(const std::string& prompt,bool no_echo)
|
std::string rs_getpass(const std::string& prompt,bool /*no_echo*/)
|
||||||
{
|
{
|
||||||
static char getpassbuf [PASS_MAX + 1];
|
static char getpassbuf [PASS_MAX + 1];
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
// For win32 systems (tested on MingW+Ubuntu)
|
// For win32 systems (tested on MingW+Ubuntu)
|
||||||
|
#undef stat64
|
||||||
#define stat64 _stati64
|
#define stat64 _stati64
|
||||||
|
|
||||||
// Should be in Iphlpapi.h, but mingw doesn't seem to have these
|
// Should be in Iphlpapi.h, but mingw doesn't seem to have these
|
||||||
|
Loading…
Reference in New Issue
Block a user