aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-01-12 20:02:47 -0500
committerGavin Andresen <gavinandresen@gmail.com>2012-01-12 20:02:47 -0500
commita1de57a063af397612bb77f87c803c578d04f8e5 (patch)
tree89195dc59b21098e0d747d88e2f4c1ee6ba9d9f0 /src/net.h
parent025d495481f2313a1550d8d101415ff3e3a6b89f (diff)
downloadbitcoin-a1de57a063af397612bb77f87c803c578d04f8e5.tar.xz
Compile with extra warnings turned on. And more makefile/code tidying up.
This turns on most gcc warnings, and removes some unused variables and other code that triggers warnings. Exceptions are: -Wno-sign-compare : triggered by lots of comparisons of signed integer to foo.size(), which is unsigned. -Wno-char-subscripts : triggered by the convert-to-hex functions (I may fix this in a future commit).
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net.h b/src/net.h
index 61daf0378c..9f58d1e5d3 100644
--- a/src/net.h
+++ b/src/net.h
@@ -266,7 +266,9 @@ public:
// Make sure not to reuse time indexes to keep things in the same order
int64 nNow = (GetTime() - 1) * 1000000;
static int64 nLastTime;
- nLastTime = nNow = std::max(nNow, ++nLastTime);
+ ++nLastTime;
+ nNow = std::max(nNow, nLastTime);
+ nLastTime = nNow;
// Each retry is 2 minutes after the last
nRequestTime = std::max(nRequestTime + 2 * 60 * 1000000, nNow);