aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-05-09 03:48:14 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-05-09 03:48:30 +0200
commitf621326c24791be14aa61221f7e35530378b84d8 (patch)
tree447995abd684e0fa74804aa5df76bd14417250c3 /src/addrman.cpp
parent781fc2c8c0972764e61dafda6fa82b7fd2a198f2 (diff)
Clean up warnings
* Use -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameters * Remove xCXXFLAGS usage in makefile.unix * Fix several recent and older sign-compare warnings
Diffstat (limited to 'src/addrman.cpp')
-rw-r--r--src/addrman.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp
index 10d005aae9..56ac9ca12c 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -102,12 +102,11 @@ CAddrInfo* CAddrMan::Create(const CAddress &addr, const CNetAddr &addrSource, in
return &mapInfo[nId];
}
-void CAddrMan::SwapRandom(int nRndPos1, int nRndPos2)
+void CAddrMan::SwapRandom(unsigned int nRndPos1, unsigned int nRndPos2)
{
if (nRndPos1 == nRndPos2)
return;
- assert(nRndPos1 >= 0 && nRndPos2 >= 0);
assert(nRndPos1 < vRandom.size() && nRndPos2 < vRandom.size());
int nId1 = vRandom[nRndPos1];
@@ -149,7 +148,7 @@ int CAddrMan::SelectTried(int nKBucket)
int CAddrMan::ShrinkNew(int nUBucket)
{
- assert(nUBucket >= 0 && nUBucket < vvNew.size());
+ assert(nUBucket >= 0 && (unsigned int)nUBucket < vvNew.size());
std::set<int> &vNew = vvNew[nUBucket];
// first look for deletable items