diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2012-01-16 22:17:48 -0500 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2012-01-16 22:18:51 -0500 |
commit | 948072c39f913d1ebe43b3b46234f9d7a0d00427 (patch) | |
tree | 6724ebe32f5ae6e05b9a7d6aa58b4defa6578f70 /src/serialize.h | |
parent | 880c47863587ef4f464c4d681713e1f24cbf1cb7 (diff) | |
download | bitcoin-948072c39f913d1ebe43b3b46234f9d7a0d00427.tar.xz |
Code tidyups, fixing various warnings.
Partial cherry pick of:
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).
Conflicts:
src/makefile.osx
src/makefile.unix
src/netbase.cpp
src/rpc.cpp
Diffstat (limited to 'src/serialize.h')
-rw-r--r-- | src/serialize.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/serialize.h b/src/serialize.h index d7b5ec80d5..385c9ab8e9 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -98,6 +98,7 @@ enum const bool fRead = false; \ unsigned int nSerSize = 0; \ ser_streamplaceholder s; \ + assert(fGetSize||fWrite||fRead); /* suppress warning */ \ s.nType = nType; \ s.nVersion = nVersion; \ {statements} \ @@ -111,6 +112,7 @@ enum const bool fWrite = true; \ const bool fRead = false; \ unsigned int nSerSize = 0; \ + assert(fGetSize||fWrite||fRead); /* suppress warning */ \ {statements} \ } \ template<typename Stream> \ @@ -121,6 +123,7 @@ enum const bool fWrite = false; \ const bool fRead = true; \ unsigned int nSerSize = 0; \ + assert(fGetSize||fWrite||fRead); /* suppress warning */ \ {statements} \ } |