aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2018-11-19 22:36:10 +0000
committerxiphon <xiphon@protonmail.com>2018-11-19 22:36:10 +0000
commitfc99f177f3bc29322fc93839e4f238c7fba9a64f (patch)
treed1bd474716fdacf66b0dd1565896b55341a84804 /src
parentMerge pull request #4842 (diff)
downloadmonero-fc99f177f3bc29322fc93839e4f238c7fba9a64f.tar.xz
lmdb: fix gcc 7.3.0 'implicit-fallthrough' warning
Diffstat (limited to 'src')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index ea3638a85..622278784 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -4358,16 +4358,12 @@ void BlockchainLMDB::migrate_2_3()
void BlockchainLMDB::migrate(const uint32_t oldversion)
{
- switch(oldversion) {
- case 0:
- migrate_0_1(); /* FALLTHRU */
- case 1:
- migrate_1_2(); /* FALLTHRU */
- case 2:
- migrate_2_3(); /* FALLTHRU */
- default:
- ;
- }
+ if (oldversion < 1)
+ migrate_0_1();
+ if (oldversion < 2)
+ migrate_1_2();
+ if (oldversion < 3)
+ migrate_2_3();
}
} // namespace cryptonote