diff --git a/libretroshare/src/gxs/rsgxsutil.cc b/libretroshare/src/gxs/rsgxsutil.cc index 8c02f86e6..e12b581d0 100644 --- a/libretroshare/src/gxs/rsgxsutil.cc +++ b/libretroshare/src/gxs/rsgxsutil.cc @@ -54,7 +54,7 @@ RsGxsMessageCleanUp::RsGxsMessageCleanUp(RsGeneralDataService* const dataService bool RsGxsMessageCleanUp::clean() { - int i = 1; + uint32_t i = 1; time_t now = time(NULL); @@ -281,7 +281,7 @@ bool RsGxsIntegrityCheck::check() std::cerr << " " << *it << std::endl; #endif } - int nb_requested_not_in_cache = 0; + uint32_t nb_requested_not_in_cache = 0; #ifdef GXSUTIL_DEBUG std::cerr << " issuing random get on friends for non existing IDs" << std::endl; @@ -289,7 +289,7 @@ bool RsGxsIntegrityCheck::check() // now request a cache update for them, which triggers downloading from friends, if missing. - for(;nb_requested_not_in_cache0;) + for(;nb_requested_not_in_cache < MAX_GXS_IDS_REQUESTS_NET && gxs_ids.size() > (size_t)0;) { uint32_t n = RSRandom::random_u32() % gxs_ids.size() ; #ifdef GXSUTIL_DEBUG diff --git a/libretroshare/src/pqi/pqibin.cc b/libretroshare/src/pqi/pqibin.cc index dcc89b525..2eb029b8d 100644 --- a/libretroshare/src/pqi/pqibin.cc +++ b/libretroshare/src/pqi/pqibin.cc @@ -270,7 +270,7 @@ int BinEncryptedFileInterface::readdata(void* data, int len) else { - if((cpyCount + len) <= sizeData) + if((cpyCount + len) <= (uint64_t)sizeData) { memcpy(data, (void *) ((this->data) + cpyCount), len); cpyCount += len; @@ -306,9 +306,9 @@ uint64_t BinEncryptedFileInterface::bytecount() bool BinEncryptedFileInterface::moretoread(uint32_t /* usec */) { if(haveData) - return (cpyCount < sizeData); + return (cpyCount < (uint64_t)sizeData); else - return cpyCount < getFileSize(); + return cpyCount < (uint64_t)getFileSize(); } BinMemInterface::BinMemInterface(int defsize, int flags) diff --git a/libretroshare/src/pqi/pqissllistener.cc b/libretroshare/src/pqi/pqissllistener.cc index 8ce1a5dbd..b204a5b58 100644 --- a/libretroshare/src/pqi/pqissllistener.cc +++ b/libretroshare/src/pqi/pqissllistener.cc @@ -57,7 +57,7 @@ const int pqissllistenzone = 49787; pqissllistenbase::pqissllistenbase(const sockaddr_storage &addr, p3PeerMgr *pm) - : laddr(addr), active(false), mPeerMgr(pm) + : laddr(addr), mPeerMgr(pm), active(false) { if (!(AuthSSL::getAuthSSL()-> active())) { diff --git a/libretroshare/src/pqi/pqistreamer.cc b/libretroshare/src/pqi/pqistreamer.cc index 65312158d..4a4db5c63 100644 --- a/libretroshare/src/pqi/pqistreamer.cc +++ b/libretroshare/src/pqi/pqistreamer.cc @@ -605,7 +605,7 @@ int pqistreamer::handleoutgoing_locked() #endif int ss=0; - if (mPkt_wpending_size != (ss = mBio->senddata(mPkt_wpending, mPkt_wpending_size))) + if (mPkt_wpending_size != (uint32_t)(ss = mBio->senddata(mPkt_wpending, mPkt_wpending_size))) { #ifdef DEBUG_PQISTREAMER std::string out; @@ -846,7 +846,7 @@ continue_packet: // so, don't do that: // memset( extradata,0,extralen ) ; - if (extralen != (tmplen = mBio->readdata(extradata, extralen))) + if (extralen != (uint32_t)(tmplen = mBio->readdata(extradata, extralen))) { #ifdef DEBUG_PQISTREAMER if(tmplen > 0) @@ -1288,7 +1288,7 @@ int pqistreamer::locked_gatherStatistics(std::list& out_lst,std:: return 1 ; } -void *pqistreamer::locked_pop_out_data(uint32_t max_slice_size,uint32_t& size,bool& starts,bool& ends,uint32_t& packet_id) +void *pqistreamer::locked_pop_out_data(uint32_t /*max_slice_size*/, uint32_t &size, bool &starts, bool &ends, uint32_t &packet_id) { size = 0 ; starts = true ; diff --git a/libretroshare/src/serialiser/rsgxsiditems.cc b/libretroshare/src/serialiser/rsgxsiditems.cc index c9fdf65af..f5019b7f4 100644 --- a/libretroshare/src/serialiser/rsgxsiditems.cc +++ b/libretroshare/src/serialiser/rsgxsiditems.cc @@ -110,7 +110,6 @@ uint32_t RsGxsIdLocalInfoItem::serial_size() std::ostream& RsGxsIdLocalInfoItem::print(std::ostream& out, uint16_t indent) { printRsItemBase(out, "RsGxsIdLocalInfoItem", indent); - uint16_t int_Indent = indent + 2; // convert from binary to hex. for(std::map::const_iterator it(mTimeStamps.begin());it!=mTimeStamps.end();++it) @@ -382,7 +381,7 @@ RsGxsIdLocalInfoItem *RsGxsIdSerialiser::deserialise_GxsIdLocalInfoItem(void *da uint32_t n=0 ; ok &= getRawUInt32(data, rssize, &offset, &n) ; - for(int i=0;ok && i