From f621326c24791be14aa61221f7e35530378b84d8 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Wed, 9 May 2012 03:48:14 +0200 Subject: 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 --- src/addrman.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/addrman.cpp') 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 &vNew = vvNew[nUBucket]; // first look for deletable items -- cgit v1.2.3