Removed some more compiler warnings from Windows compile (GCC 4.4).

Added -Wextra to the Windows compile.
Added new define in libbitdht for snprintf and fprintf to proper handling of "%ll" under Windows.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4951 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-02-17 10:03:38 +00:00
parent 2d2b7230d1
commit 970d88200d
35 changed files with 170 additions and 125 deletions

View file

@ -143,7 +143,7 @@ bool p3BanList::recvBanItem(RsBanListItem *item)
}
/* overloaded from pqiNetAssistSharePeer */
void p3BanList::updatePeer(std::string id, struct sockaddr_in addr, int type, int reason, int age)
void p3BanList::updatePeer(std::string /*id*/, struct sockaddr_in addr, int /*type*/, int /*reason*/, int age)
{
std::string ownId = mLinkMgr->getOwnId();
@ -160,7 +160,7 @@ void p3BanList::updatePeer(std::string id, struct sockaddr_in addr, int type, in
}
bool p3BanList::addBanEntry(const std::string &peerId, const struct sockaddr_in &addr, uint32_t level, uint32_t reason, uint32_t age)
bool p3BanList::addBanEntry(const std::string &peerId, const struct sockaddr_in &addr, int level, uint32_t reason, uint32_t age)
{
RsStackMutex stack(mBanMtx); /****** LOCKED MUTEX *******/
@ -217,7 +217,7 @@ bool p3BanList::addBanEntry(const std::string &peerId, const struct sockaddr_in
/* see if it needs an update */
if ((mit->second.reason != reason) ||
(mit->second.level != level) ||
(mit->second.mTs < now - age))
(mit->second.mTs < (time_t) (now - age)))
{
/* update */
mit->second.addr = addr;

View file

@ -94,7 +94,7 @@ class p3BanList: /* public RsBanList, */ public p3Service, public pqiNetAssistPe
bool recvBanItem(RsBanListItem *item);
bool addBanEntry(const std::string &peerId, const struct sockaddr_in &addr,
uint32_t level, uint32_t reason, uint32_t age);
int level, uint32_t reason, uint32_t age);
void sendBanLists();
int sendBanSet(std::string peerid);

View file

@ -708,7 +708,7 @@ void p3ChatService::handleRecvChatLobbyEventItem(RsChatLobbyEventItem *item)
std::cerr << "Received ChatLobbyEvent item of type " << (int)(item->event_type) << ", and string=" << item->string1 << std::endl;
#endif
if(time(NULL)+100 > item->sendTime + MAX_KEEP_MSG_RECORD) // the message is older than the max cache keep minus 100 seconds ! It's too old, and is going to make an echo!
if(time(NULL)+100 > (time_t) item->sendTime + MAX_KEEP_MSG_RECORD) // the message is older than the max cache keep minus 100 seconds ! It's too old, and is going to make an echo!
{
std::cerr << "Received severely outdated lobby event item! Dropping it!" << std::endl;
std::cerr << "Message item is:" << std::endl;
@ -820,7 +820,7 @@ bool p3ChatService::handleRecvChatMsgItem(RsChatMsgItem *ci)
return true ;
}
if(now+100 > cli->sendTime + MAX_KEEP_MSG_RECORD) // the message is older than the max cache keep plus 100 seconds ! It's too old, and is going to make an echo!
if(now+100 > (time_t) cli->sendTime + MAX_KEEP_MSG_RECORD) // the message is older than the max cache keep plus 100 seconds ! It's too old, and is going to make an echo!
{
std::cerr << "Received severely outdated message!Dropping it!" << std::endl;
std::cerr << "Message item is:" << std::endl;