Fixed compile on Windows and removed some compiler warnings.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4033 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-02-11 21:23:44 +00:00
parent 074f382eab
commit 4b8766aec3
3 changed files with 3 additions and 2 deletions

View File

@ -3311,7 +3311,7 @@ bool p3ConnectMgr::checkNetAddress()
// Random port avoids clashes, improves anonymity. // Random port avoids clashes, improves anonymity.
// //
uint32_t default_port_seed = 0 ; uint32_t default_port_seed = 0 ;
for(uint i=0;i<mOwnState.id.size();++i) for(std::string::size_type i=0;i<mOwnState.id.size();++i)
default_port_seed = (0x473a8b74u * (unsigned int)(mOwnState.id[i]) + default_port_seed)^0x11837bea ; default_port_seed = (0x473a8b74u * (unsigned int)(mOwnState.id[i]) + default_port_seed)^0x11837bea ;
mOwnState.currentlocaladdr.sin_port = htons(PQI_MIN_PORT + (default_port_seed % (PQI_MAX_PORT - PQI_MIN_PORT))); mOwnState.currentlocaladdr.sin_port = htons(PQI_MIN_PORT + (default_port_seed % (PQI_MAX_PORT - PQI_MIN_PORT)));

View File

@ -243,7 +243,9 @@ void p3GroupDistrib::run() /* called once the thread is started */
std::cerr << std::endl; std::cerr << std::endl;
#endif #endif
#ifdef DISTRIB_DUMMYMSG_DEBUG
int printed = 0; int printed = 0;
#endif
while(1) while(1)
{ {

View File

@ -833,7 +833,6 @@ void SearchDialog::insertFile(const std::string& txt,qulonglong searchId, const
// 1 - look in result window whether the file already exists. // 1 - look in result window whether the file already exists.
// //
int items = ui.searchResultWidget->topLevelItemCount();
bool found = false ; bool found = false ;
int sources; int sources;
int friendSource = 0; int friendSource = 0;