From 072b0fd708dae5a8578124172da93e2d421a2dff Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Wed, 14 Dec 2016 17:33:46 +0400 Subject: [PATCH] fix annoying compiler warnings (#1204) --- src/chainparams.cpp | 2 +- src/spork.cpp | 2 +- src/spork.h | 10 +++++----- src/test/univalue_tests.cpp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 3e244f53d..5548d0b70 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -240,7 +240,7 @@ public: nMaxTipAge = 0x7fffffff; // allow mining on top of old blocks for testnet nPruneAfterHeight = 1000; - genesis = CreateGenesisBlock(1390666206, 3861367235, 0x1e0ffff0, 1, 50 * COIN); + genesis = CreateGenesisBlock(1390666206UL, 3861367235UL, 0x1e0ffff0, 1, 50 * COIN); consensus.hashGenesisBlock = genesis.GetHash(); assert(consensus.hashGenesisBlock == uint256S("0x00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c")); assert(genesis.hashMerkleRoot == uint256S("0xe0028eb9648db56b1ac77cf090b99048a8007e2bb64b68f092c03c7f56a662c7")); diff --git a/src/spork.cpp b/src/spork.cpp index 130e935a9..1fe936804 100644 --- a/src/spork.cpp +++ b/src/spork.cpp @@ -115,7 +115,7 @@ bool CSporkManager::IsSporkActive(int nSporkID) case SPORK_14_REQUIRE_SENTINEL_FLAG: r = SPORK_14_REQUIRE_SENTINEL_FLAG_DEFAULT; break; default: LogPrint("spork", "CSporkManager::IsSporkActive -- Unknown Spork ID %d\n", nSporkID); - r = 4070908800; // 2099-1-1 i.e. off by default + r = 4070908800ULL; // 2099-1-1 i.e. off by default break; } } diff --git a/src/spork.h b/src/spork.h index d586d3220..d363817a5 100644 --- a/src/spork.h +++ b/src/spork.h @@ -32,12 +32,12 @@ static const int SPORK_14_REQUIRE_SENTINEL_FLAG = 10013; static const int64_t SPORK_2_INSTANTSEND_ENABLED_DEFAULT = 0; // ON static const int64_t SPORK_3_INSTANTSEND_BLOCK_FILTERING_DEFAULT = 0; // ON static const int64_t SPORK_5_INSTANTSEND_MAX_VALUE_DEFAULT = 1000; // 1000 DASH -static const int64_t SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT = 4070908800; // OFF -static const int64_t SPORK_9_SUPERBLOCKS_ENABLED_DEFAULT = 4070908800; // OFF -static const int64_t SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT = 4070908800; // OFF +static const int64_t SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT = 4070908800ULL;// OFF +static const int64_t SPORK_9_SUPERBLOCKS_ENABLED_DEFAULT = 4070908800ULL;// OFF +static const int64_t SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT = 4070908800ULL;// OFF static const int64_t SPORK_12_RECONSIDER_BLOCKS_DEFAULT = 0; // 0 BLOCKS -static const int64_t SPORK_13_OLD_SUPERBLOCK_FLAG_DEFAULT = 4070908800; // OFF -static const int64_t SPORK_14_REQUIRE_SENTINEL_FLAG_DEFAULT = 4070908800; // OFF +static const int64_t SPORK_13_OLD_SUPERBLOCK_FLAG_DEFAULT = 4070908800ULL;// OFF +static const int64_t SPORK_14_REQUIRE_SENTINEL_FLAG_DEFAULT = 4070908800ULL;// OFF extern std::map mapSporks; extern CSporkManager sporkManager; diff --git a/src/test/univalue_tests.cpp b/src/test/univalue_tests.cpp index 886317cad..aca7a02fc 100644 --- a/src/test/univalue_tests.cpp +++ b/src/test/univalue_tests.cpp @@ -83,7 +83,7 @@ BOOST_AUTO_TEST_CASE(univalue_typecheck) UniValue v4; BOOST_CHECK(v4.setNumStr("2147483648")); - BOOST_CHECK_EQUAL(v4.get_int64(), 2147483648); + BOOST_CHECK_EQUAL(v4.get_int64(), 2147483648ULL); BOOST_CHECK_THROW(v4.get_int(), runtime_error); BOOST_CHECK(v4.setNumStr("1000")); BOOST_CHECK_EQUAL(v4.get_int(), 1000);