From 57af0d8ef025af734c0aad9ae8f43e0e7f4a61ab Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Fri, 16 Nov 2012 08:29:47 +0100 Subject: ensure we use our format macros to avoid compilation warnings - fixes 2 warnings I observed while compiling on Windows with MinGW --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 988bee6500..1c72881be0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1251,7 +1251,7 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex) } if (vtx[0].GetValueOut() > GetBlockValue(pindex->nHeight, nFees)) - return error("ConnectBlock() : coinbase pays too much (actual=%lld vs limit=%lld)", (long long)vtx[0].GetValueOut(), (long long)GetBlockValue(pindex->nHeight, nFees)); + return error("ConnectBlock() : coinbase pays too much (actual=%"PRI64u" vs limit=%"PRI64u")", vtx[0].GetValueOut(), GetBlockValue(pindex->nHeight, nFees)); // Update block index on disk without changing it in memory. // The memory index structure will be changed after the db commits. -- cgit v1.2.3 From 6247c53528eae6fd534f22cb5b603dd7546e9502 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Fri, 16 Nov 2012 21:46:16 +0100 Subject: ConnectBlock(): fix error() format to be unsigned - I introduced the wrong format macro with my former patch (#2018), this needs to be signed not unsigned (thanks Luke-Jr) --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 1c72881be0..a597089f1c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1251,7 +1251,7 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex) } if (vtx[0].GetValueOut() > GetBlockValue(pindex->nHeight, nFees)) - return error("ConnectBlock() : coinbase pays too much (actual=%"PRI64u" vs limit=%"PRI64u")", vtx[0].GetValueOut(), GetBlockValue(pindex->nHeight, nFees)); + return error("ConnectBlock() : coinbase pays too much (actual=%"PRI64d" vs limit=%"PRI64d")", vtx[0].GetValueOut(), GetBlockValue(pindex->nHeight, nFees)); // Update block index on disk without changing it in memory. // The memory index structure will be changed after the db commits. -- cgit v1.2.3