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

@ -343,9 +343,9 @@ int addKnownNode(const bdId *id, uint32_t flags);
private:
DhtPeerDetails *addInternalPeer_locked(const std::string pid, int type);
DhtPeerDetails *addInternalPeer_locked(const std::string pid, uint32_t type);
int removeInternalPeer_locked(const std::string pid);
DhtPeerDetails *findInternalDhtPeer_locked(const bdNodeId *id, int type);
DhtPeerDetails *findInternalDhtPeer_locked(const bdNodeId *id, uint32_t type);
DhtPeerDetails *findInternalRsPeer_locked(const std::string &pid);
bool havePeerTranslation_locked(const std::string &pid);

View file

@ -46,7 +46,7 @@
* -> do we care if we know them? not really!
*/
int p3BitDht::InfoCallback(const bdId *id, uint32_t type, uint32_t flags, std::string info)
int p3BitDht::InfoCallback(const bdId *id, uint32_t /*type*/, uint32_t /*flags*/, std::string /*info*/)
{
/* translate info */
std::string rsid;
@ -1893,7 +1893,7 @@ void p3BitDht::initiateConnection(const bdId *srcId, const bdId *proxyId, const
std::cerr << std::endl;
#endif
uint32_t touConnectMode = 0;
// uint32_t touConnectMode = 0;
std::string rsId;
{
@ -1923,7 +1923,7 @@ void p3BitDht::initiateConnection(const bdId *srcId, const bdId *proxyId, const
{
default:
case BITDHT_CONNECT_MODE_DIRECT:
touConnectMode = RSDHT_TOU_MODE_DIRECT;
// touConnectMode = RSDHT_TOU_MODE_DIRECT;
connectFlags |= RS_CB_FLAG_MODE_UDP_DIRECT;
delay = delayOrBandwidth;
break;
@ -1941,12 +1941,12 @@ void p3BitDht::initiateConnection(const bdId *srcId, const bdId *proxyId, const
delay = delayOrBandwidth;
if (useProxyPort)
{
touConnectMode = RSDHT_TOU_MODE_PROXY;
// touConnectMode = RSDHT_TOU_MODE_PROXY;
connectFlags |= RS_CB_FLAG_MODE_UDP_PROXY;
}
else
{
touConnectMode = RSDHT_TOU_MODE_DIRECT;
// touConnectMode = RSDHT_TOU_MODE_DIRECT;
connectFlags |= RS_CB_FLAG_MODE_UDP_DIRECT;
}
@ -1954,7 +1954,7 @@ void p3BitDht::initiateConnection(const bdId *srcId, const bdId *proxyId, const
break;
case BITDHT_CONNECT_MODE_RELAY:
touConnectMode = RSDHT_TOU_MODE_RELAY;
// touConnectMode = RSDHT_TOU_MODE_RELAY;
connectFlags |= RS_CB_FLAG_MODE_UDP_RELAY;
bandwidth = delayOrBandwidth;
break;

View file

@ -184,7 +184,7 @@ bool p3BitDht::dropPeer(std::string pid)
********************************* Basic Peer Details *************************************
******************************************************************************************/
int p3BitDht::addBadPeer(const struct sockaddr_in &addr, uint32_t reason, uint32_t flags, uint32_t age)
int p3BitDht::addBadPeer(const struct sockaddr_in &addr, uint32_t /*reason*/, uint32_t /*flags*/, uint32_t /*age*/)
{
//mUdpBitDht->updateKnownPeer(&id, 0, bdflags);
@ -359,7 +359,7 @@ int p3BitDht::removePeer(const std::string pid)
********************************* Basic Peer Details *************************************
******************************************************************************************/
DhtPeerDetails *p3BitDht::addInternalPeer_locked(const std::string pid, int type)
DhtPeerDetails *p3BitDht::addInternalPeer_locked(const std::string pid, uint32_t type)
{
/* create the data structure */
if (!havePeerTranslation_locked(pid))
@ -417,7 +417,7 @@ int p3BitDht::removeInternalPeer_locked(const std::string pid)
/* indexed by bdNodeId, as this is the more used call interface */
DhtPeerDetails *p3BitDht::findInternalDhtPeer_locked(const bdNodeId *id, int type)
DhtPeerDetails *p3BitDht::findInternalDhtPeer_locked(const bdNodeId *id, uint32_t type)
{
std::map<bdNodeId, DhtPeerDetails>::iterator it = mPeers.find(*id);
if (it == mPeers.end())