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.
This commit is contained in:
Wladimir J. van der Laan
2017-03-24 09:03:59 +13:00
committed by Jack Grigg
parent 599d2c4034
commit 0e2b1ae259
+1 -1
View File
@@ -56,7 +56,7 @@ struct CDiskBlockPos
};
enum BlockStatus {
enum BlockStatus: uint32_t {
//! Unused.
BLOCK_VALID_UNKNOWN = 0,