From 735a60698c845f257a0f7e9b617d50669d9179d4 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Sun, 22 Apr 2012 14:01:25 -0400 Subject: [PATCH] Change signed->unsigned at 3 code sites This resolves signed/unsigned comparison warnings. --- src/db.cpp | 2 +- src/net.cpp | 2 +- src/util.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/db.cpp b/src/db.cpp index 39a4189..53da378 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -648,7 +648,7 @@ bool CTxDB::LoadBlockIndex() } } // check level 4: check whether spent txouts were spent within the main chain - int nOutput = 0; + unsigned int nOutput = 0; if (nCheckLevel>3) { BOOST_FOREACH(const CDiskTxPos &txpos, txindex.vSpent) diff --git a/src/net.cpp b/src/net.cpp index 38c0d3d..d218dcf 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -498,7 +498,7 @@ void ThreadSocketHandler2(void* parg) { printf("ThreadSocketHandler started\n"); list vNodesDisconnected; - int nPrevNodeCount = 0; + unsigned int nPrevNodeCount = 0; loop { diff --git a/src/util.h b/src/util.h index fe8ca60..d9d8151 100644 --- a/src/util.h +++ b/src/util.h @@ -579,9 +579,9 @@ template class CMedianFilter private: std::vector vValues; std::vector vSorted; - int nSize; + unsigned int nSize; public: - CMedianFilter(int size, T initial_value): + CMedianFilter(unsigned int size, T initial_value): nSize(size) { vValues.reserve(size); -- 1.7.1