aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2016-04-28 13:35:16 +0200
committerWladimir J. van der Laan <[email protected]>2016-04-28 13:35:16 +0200
commit073225cb01d9c2629c7a423dbe6afcd07601ffb7 (patch)
tree287b825155920aed49f3111aee5b937078dc2223 /src
parentMerge #7514: Fix IsInitialBlockDownload for testnet (diff)
downloaddiscoin-073225cb01d9c2629c7a423dbe6afcd07601ffb7.tar.xz
discoin-073225cb01d9c2629c7a423dbe6afcd07601ffb7.zip
chain: define enum used as bit field as uint32_t
Bitwise logic combined with `<` with undefined signedness will potentially results in undefined behavior. Fix this by defining the type as a c++11 typed enum. Fixes #6017.
Diffstat (limited to 'src')
-rw-r--r--src/chain.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/chain.h b/src/chain.h
index 5b9605a80..017d4fe45 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -54,7 +54,7 @@ struct CDiskBlockPos
};
-enum BlockStatus {
+enum BlockStatus: uint32_t {
//! Unused.
BLOCK_VALID_UNKNOWN = 0,