diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-12-05 15:26:45 +0100 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-12-05 15:36:08 +0100 |
commit | fa8adbe7c17b16cf7ecd16eb9f3f1792e9da2876 (patch) | |
tree | 60908342bc139bbcf143639dc0818b995df56cc8 /src/wallet/walletdb.cpp | |
parent | b3ab0c3819cf36e902989e0544365807ac0823e6 (diff) | |
download | bitcoin-fa8adbe7c17b16cf7ecd16eb9f3f1792e9da2876.tar.xz |
build: Enable -Wunreachable-code
Diffstat (limited to 'src/wallet/walletdb.cpp')
-rw-r--r-- | src/wallet/walletdb.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index 96999de97b..ba453b47e7 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -1499,17 +1499,19 @@ std::unique_ptr<WalletDatabase> MakeDatabase(const fs::path& path, const Databas if (format == DatabaseFormat::SQLITE) { #ifdef USE_SQLITE return MakeSQLiteDatabase(path, options, status, error); -#endif +#else error = Untranslated(strprintf("Failed to open database path '%s'. Build does not support SQLite database format.", fs::PathToString(path))); status = DatabaseStatus::FAILED_BAD_FORMAT; return nullptr; +#endif } #ifdef USE_BDB return MakeBerkeleyDatabase(path, options, status, error); -#endif +#else error = Untranslated(strprintf("Failed to open database path '%s'. Build does not support Berkeley DB database format.", fs::PathToString(path))); status = DatabaseStatus::FAILED_BAD_FORMAT; return nullptr; +#endif } } // namespace wallet |