pass over compiler warnings

This commit is contained in:
csoler 2016-06-05 10:43:57 -04:00
parent c2ae4fc904
commit 927f782bef
23 changed files with 66 additions and 73 deletions

View file

@ -266,7 +266,7 @@ int BinEncryptedFileInterface::readdata(void* data, int len)
}
if(len <= sizeData)
if((uint64_t)len <= sizeData)
{
memcpy(data, this->data, len);
cpyCount += len;

View file

@ -671,7 +671,7 @@ int pqistreamer::handleincoming_locked()
allocate_rpend_locked();
// enough space to read any packet.
int maxlen = mPkt_rpend_size;
uint32_t maxlen = mPkt_rpend_size;
void *block = mPkt_rpending;
// initial read size: basic packet.
@ -787,7 +787,7 @@ continue_packet:
std::cerr << "[" << (void*)pthread_self() << "] " << "continuing packet state=" << mReading_state << std::endl ;
std::cerr << "[" << (void*)pthread_self() << "] " << "block 1 : " << RsUtil::BinToHex(block,8) << std::endl;
#endif
if (extralen > maxlen - blen)
if (extralen + (uint32_t)blen > maxlen)
{
pqioutput(PQL_ALERT, pqistreamerzone, "ERROR: Read Packet too Big!");

View file

@ -1381,8 +1381,10 @@ RsPeerDetails::RsPeerDetails()
trustLvl(0), validLvl(0),ownsign(false),
hasSignedMe(false),accept_connection(false),
state(0),localAddr(""),localPort(0),extAddr(""),extPort(0),netMode(0),vs_disc(0), vs_dht(0),
lastConnect(0),connectState(0),connectStateString(""),connectPeriod(0),
hiddenType(RS_HIDDEN_TYPE_NONE), foundDHT(false), wasDeniedConnection(false), deniedTS(0)
lastConnect(0),connectState(0),connectStateString(""),
hiddenType(RS_HIDDEN_TYPE_NONE),
connectPeriod(0),
foundDHT(false), wasDeniedConnection(false), deniedTS(0)
{
}

View file

@ -7,12 +7,15 @@
#if defined(HAS_GNOME_KEYRING) || defined(__FreeBSD__) || defined(__OpenBSD__)
#include <gnome-keyring-1/gnome-keyring.h>
GnomeKeyringPasswordSchema my_schema = {
GNOME_KEYRING_ITEM_ENCRYPTION_KEY_PASSWORD,
{
{ "RetroShare SSL Id", GNOME_KEYRING_ATTRIBUTE_TYPE_STRING },
{ NULL, (GnomeKeyringAttributeType)0 }
}
GnomeKeyringPasswordSchema my_schema = {
GNOME_KEYRING_ITEM_ENCRYPTION_KEY_PASSWORD,
{
{ "RetroShare SSL Id", GNOME_KEYRING_ATTRIBUTE_TYPE_STRING },
{ NULL, (GnomeKeyringAttributeType)0 }
},
NULL,
NULL,
NULL
};
#endif

View file

@ -1060,6 +1060,7 @@ bool p3GxsCircles::locked_processLoadingCacheEntry(RsGxsCircleCache& cache)
/* check cache */
if(!(pit->second.subscription_flags & GXS_EXTERNAL_CIRCLE_FLAGS_KEY_AVAILABLE))
{
if(mIdentities->haveKey(pit->first))
{
pit->second.subscription_flags |= GXS_EXTERNAL_CIRCLE_FLAGS_KEY_AVAILABLE;
@ -1068,26 +1069,27 @@ bool p3GxsCircles::locked_processLoadingCacheEntry(RsGxsCircleCache& cache)
#endif
}
else
{
std::list<PeerId> peers;
{
std::list<PeerId> peers;
if(!cache.mOriginator.isNull())
{
peers.push_back(cache.mOriginator) ;
if(!cache.mOriginator.isNull())
{
peers.push_back(cache.mOriginator) ;
#ifdef DEBUG_CIRCLES
std::cerr << " Requesting unknown/unloaded identity: " << pit->first << " to originator " << cache.mOriginator << std::endl;
std::cerr << " Requesting unknown/unloaded identity: " << pit->first << " to originator " << cache.mOriginator << std::endl;
#endif
}
else
{
std::cerr << " (WW) cache entry for circle " << cache.mCircleId << " has empty originator. Asking info for GXS id " << pit->first << " to all connected friends." << std::endl;
}
else
{
std::cerr << " (WW) cache entry for circle " << cache.mCircleId << " has empty originator. Asking info for GXS id " << pit->first << " to all connected friends." << std::endl;
rsPeers->getOnlineList(peers) ;
}
rsPeers->getOnlineList(peers) ;
}
mIdentities->requestKey(pit->first, peers);
//isUnprocessedPeers = true;
}
mIdentities->requestKey(pit->first, peers);
//isUnprocessedPeers = true;
}
}
#ifdef DEBUG_CIRCLES
else
std::cerr << " Key is available. Nothing to process." << std::endl;