diff options
author | Gregory Maxwell <gmaxwell@gmail.com> | 2012-05-09 04:07:24 -0700 |
---|---|---|
committer | Gregory Maxwell <gmaxwell@gmail.com> | 2012-05-09 04:07:24 -0700 |
commit | 2e767410b83a4468bf83be9c39f99cf0325c7739 (patch) | |
tree | c7777e11f9360dc415a19a7fcb04daa1e945976b /src/addrman.cpp | |
parent | c164396ddc57e26dfd5308c24445a7756caa9255 (diff) | |
parent | f621326c24791be14aa61221f7e35530378b84d8 (diff) |
Merge pull request #1230 from sipa/warnings
Clean up warnings
Diffstat (limited to 'src/addrman.cpp')
-rw-r--r-- | src/addrman.cpp | 5 |
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 |