From aef688225365ca2a28238926104d98a228acfaa3 Mon Sep 17 00:00:00 2001 From: svost Date: Thu, 7 May 2015 15:04:47 +0300 Subject: [PATCH] Fix MSVC C4101 warnings --- src/db.cpp | 6 +++--- src/main.cpp | 2 +- src/rpcmining.cpp | 2 +- src/rpcrawtransaction.cpp | 6 +++--- src/txdb-bdb.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/db.cpp b/src/db.cpp index e0f724c..110a3f0 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -543,7 +543,7 @@ bool CAddrDB::Write(const CAddrMan& addr) try { fileout << ssPeers; } - catch (std::exception &e) { + catch (const std::exception&) { return error("CAddrman::Write() : I/O error"); } FileCommit(fileout); @@ -578,7 +578,7 @@ bool CAddrDB::Read(CAddrMan& addr) filein.read((char *)&vchData[0], dataSize); filein >> hashIn; } - catch (std::exception &e) { + catch (const std::exception&) { return error("CAddrman::Read() 2 : I/O error or stream data corrupted"); } filein.fclose(); @@ -602,7 +602,7 @@ bool CAddrDB::Read(CAddrMan& addr) // de-serialize address data into one CAddrMan object ssPeers >> addr; } - catch (std::exception &e) { + catch (const std::exception&) { return error("CAddrman::Read() : I/O error or stream data corrupted"); } diff --git a/src/main.cpp b/src/main.cpp index b4a03a5..6df49c7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3004,7 +3004,7 @@ bool LoadExternalBlockFile(FILE* fileIn) } } } - catch (std::exception &e) { + catch (const std::exception&) { printf("%s() : Deserialize or I/O error caught during load\n", BOOST_CURRENT_FUNCTION); } diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index d5bc43b..427f63c 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -563,7 +563,7 @@ Value submitblock(const Array& params, bool fHelp) try { ssBlock >> block; } - catch (std::exception &e) { + catch (const std::exception&) { throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Block decode failed"); } diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index a71871d..67f7532 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -304,7 +304,7 @@ Value decoderawtransaction(const Array& params, bool fHelp) try { ssData >> tx; } - catch (std::exception &e) { + catch (const std::exception&) { throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); } @@ -366,7 +366,7 @@ Value signrawtransaction(const Array& params, bool fHelp) ssData >> tx; txVariants.push_back(tx); } - catch (std::exception &e) { + catch (const std::exception&) { throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); } } @@ -560,7 +560,7 @@ Value sendrawtransaction(const Array& params, bool fHelp) try { ssData >> tx; } - catch (std::exception &e) { + catch (const std::exception&) { throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); } uint256 hashTx = tx.GetHash(); diff --git a/src/txdb-bdb.cpp b/src/txdb-bdb.cpp index 0df61fe..416247c 100644 --- a/src/txdb-bdb.cpp +++ b/src/txdb-bdb.cpp @@ -424,7 +424,7 @@ bool CTxDB::LoadBlockIndexGuts() break; // if shutdown requested or finished loading block index } } // try - catch (std::exception &e) { + catch (const std::exception&) { return error("%s() : deserialize error", BOOST_CURRENT_FUNCTION); } } -- 1.7.1