Merge pull request #220 from svost/C4101
authorCryptoManiac <CryptoManiac@users.noreply.github.com>
Fri, 8 May 2015 16:54:50 +0000 (19:54 +0300)
committerCryptoManiac <CryptoManiac@users.noreply.github.com>
Fri, 8 May 2015 16:54:50 +0000 (19:54 +0300)
Fix MSVC C4101 warnings

src/db.cpp
src/main.cpp
src/rpcmining.cpp
src/rpcrawtransaction.cpp
src/txdb-bdb.cpp

index e0f724c..110a3f0 100644 (file)
@@ -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");
     }
 
index b4a03a5..6df49c7 100644 (file)
@@ -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);
         }
index d5bc43b..427f63c 100644 (file)
@@ -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");
     }
 
index 32a339b..44bb8c1 100644 (file)
@@ -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();
index 0df61fe..416247c 100644 (file)
@@ -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);
         }
     }