Fix clang warning

This commit is contained in:
Sebastian Messmer 2017-10-02 08:01:38 +01:00
parent 180170e250
commit 0af087c120

View File

@ -34,6 +34,11 @@ namespace boost {
return stream << "CryConfigFile()"; return stream << "CryConfigFile()";
} }
} }
namespace cryfs {
inline ostream &operator<<(ostream &stream, const CryConfigLoader::ConfigLoadResult &) {
return stream << "ConfigLoadResult()";
}
}
#include <boost/optional/optional_io.hpp> #include <boost/optional/optional_io.hpp>
class FakeRandomGenerator final : public cpputils::RandomGenerator { class FakeRandomGenerator final : public cpputils::RandomGenerator {
@ -98,7 +103,7 @@ public:
FakeRandomGenerator generator(Data::FromString(encKey)); FakeRandomGenerator generator(Data::FromString(encKey));
auto loader = CryConfigLoader(console, generator, SCrypt::TestSettings, askPassword, auto loader = CryConfigLoader(console, generator, SCrypt::TestSettings, askPassword,
askPassword, none, none, none); askPassword, none, none, none);
loader.loadOrCreate(file.path()).value().configFile; ASSERT_NE(boost::none, loader.loadOrCreate(file.path()));
} }
void ChangeEncryptionKey(const string &encKey, const string& password = "mypassword") { void ChangeEncryptionKey(const string &encKey, const string& password = "mypassword") {