aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-09-02 11:33:38 +0200
committerRiccardo Spagni <ric@spagni.net>2017-09-02 11:33:38 +0200
commite83666d9aa7be254b12c22bb58a4b27cc30e7178 (patch)
tree058af3d069f8a05d22aa580a428c79b26bca4b15
parentMerge pull request #2343 (diff)
parentSilence stupid fallthru warning in gcc 7 (diff)
downloadmonero-e83666d9aa7be254b12c22bb58a4b27cc30e7178.tar.xz
Merge pull request #2358
0c6c3eb3 Silence stupid fallthru warning in gcc 7 (Howard Chu)
-rw-r--r--external/boost/archive/portable_binary_oarchive.hpp15
-rw-r--r--src/simplewallet/simplewallet.cpp1
2 files changed, 11 insertions, 5 deletions
diff --git a/external/boost/archive/portable_binary_oarchive.hpp b/external/boost/archive/portable_binary_oarchive.hpp
index 9ed30d064..e2dcb9456 100644
--- a/external/boost/archive/portable_binary_oarchive.hpp
+++ b/external/boost/archive/portable_binary_oarchive.hpp
@@ -41,19 +41,24 @@ class portable_binary_oarchive_exception :
public boost::archive::archive_exception
{
public:
- typedef enum {
+ enum exception_code {
invalid_flags
- } exception_code;
- portable_binary_oarchive_exception(exception_code c = invalid_flags )
+ } m_exception_code ;
+ portable_binary_oarchive_exception(exception_code c = invalid_flags ) :
+ boost::archive::archive_exception(boost::archive::archive_exception::other_exception),
+ m_exception_code(c)
{}
virtual const char *what( ) const throw( )
{
const char *msg = "programmer error";
- switch(code){
+ switch(m_exception_code){
case invalid_flags:
msg = "cannot be both big and little endian";
+ break;
default:
- boost::archive::archive_exception::what();
+ msg = boost::archive::archive_exception::what();
+ assert(false);
+ break;
}
return msg;
}
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 479adcafc..e4b061529 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -2431,6 +2431,7 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri
break;
default:
LOG_ERROR("Unknown transfer method, using original");
+ /* FALLTHRU */
case TransferOriginal:
ptx_vector = m_wallet->create_transactions(dsts, fake_outs_count, 0 /* unlock_time */, priority, extra, m_trusted_daemon);
break;