fixed a few compilation warnings

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7859 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-01-23 08:22:54 +00:00
parent 2e211a6904
commit bf11765ff1
5 changed files with 9 additions and 12 deletions

View File

@ -54,7 +54,7 @@ static const uint32_t MAX_AVATAR_JPEG_SIZE = 32767; // Maximum size
// Images are 96x96, which makes approx. 27000 bytes uncompressed.
p3ChatService::p3ChatService(p3ServiceControl *sc,p3IdService *pids, p3LinkMgr *lm, p3HistoryMgr *historyMgr)
:p3Service(), p3Config(), mChatMtx("p3ChatService"),DistantChatService(pids),DistributedChatService(getServiceInfo().mServiceType,sc,historyMgr),mServiceCtrl(sc), mLinkMgr(lm) , mHistoryMgr(historyMgr)
:DistantChatService(pids),DistributedChatService(getServiceInfo().mServiceType,sc,historyMgr), mChatMtx("p3ChatService"),mServiceCtrl(sc), mLinkMgr(lm) , mHistoryMgr(historyMgr)
{
_serializer = new RsChatSerialiser() ;
@ -654,9 +654,6 @@ bool p3ChatService::checkForMessageSecurity(RsChatMsgItem *ci)
bool p3ChatService::handleRecvChatMsgItem(RsChatMsgItem *ci)
{
bool publicChanged = false;
bool privateChanged = false;
time_t now = time(NULL);
std::string name;
uint32_t popupChatFlag = RS_POPUP_CHAT;

View File

@ -263,7 +263,7 @@ void HashCache::save()
std::cerr << "Cannot open encrypted file cache for writing: " << _path+".bin.tmp" << std::endl;
goto save_free;
}
if(fwrite(encryptedData,1,encDataLen,F) != encDataLen)
if(fwrite(encryptedData,1,encDataLen,F) != (uint32_t)encDataLen)
{
std::cerr << "Could not write entire encrypted hash cache file. Out of disc space??" << std::endl;
fclose(F) ;

View File

@ -1775,8 +1775,8 @@ void p3BitDht::ConnectCalloutTCPAttempt(const RsPeerId &peerId, struct sockaddr_
sockaddr_storage_clear(srcaddr);
struct sockaddr_in *rap = (struct sockaddr_in *) &raddr;
struct sockaddr_in *pap = (struct sockaddr_in *) &proxyaddr;
struct sockaddr_in *sap = (struct sockaddr_in *) &srcaddr;
//struct sockaddr_in *pap = (struct sockaddr_in *) &proxyaddr;
//struct sockaddr_in *sap = (struct sockaddr_in *) &srcaddr;
// only one to translate
rap->sin_family = AF_INET;
@ -1803,8 +1803,8 @@ void p3BitDht::ConnectCalloutDirectOrProxy(const RsPeerId &peerId, struct sockad
sockaddr_storage_clear(srcaddr);
struct sockaddr_in *rap = (struct sockaddr_in *) &raddr;
struct sockaddr_in *pap = (struct sockaddr_in *) &proxyaddr;
struct sockaddr_in *sap = (struct sockaddr_in *) &srcaddr;
// struct sockaddr_in *pap = (struct sockaddr_in *) &proxyaddr;
// struct sockaddr_in *sap = (struct sockaddr_in *) &srcaddr;
// only one to translate
rap->sin_family = AF_INET;

View File

@ -786,7 +786,7 @@ bool p3PeerMgrIMPL::removeFriend(const RsPgpId &id)
RsStackMutex stack(mPeerMtx); /****** STACK LOCK MUTEX *******/
/* move to othersList */
bool success = false;
bool success = false;
std::map<RsPeerId, peerState>::iterator it;
//remove ssl and gpg_ids
for(it = mFriendList.begin(); it != mFriendList.end(); ++it)

View File

@ -1037,13 +1037,13 @@ UdpRelayProxy::UdpRelayProxy()
UdpRelayProxy::UdpRelayProxy(UdpRelayAddrSet *addrSet, int relayClass, uint32_t bandwidth)
: mAddrs(*addrSet),
mRelayClass(relayClass),
mBandwidth(0),
mDataSize(0),
mLastBandwidthTS(0),
mLastTS(time(NULL)),
mStartTS(time(NULL)),
mBandwidthLimit(bandwidth)
mBandwidthLimit(bandwidth),
mRelayClass(relayClass)
{
/* bandwidth fallback */
if (bandwidth == 0)