\#10 Address compiler warnings
This commit is contained in:
@ -611,10 +611,10 @@ TEST(file_manager, upload_occurs_after_write_if_fully_downloaded) {
|
||||
});
|
||||
EXPECT_CALL(mp, set_item_meta("/test_write_full_download.txt", _))
|
||||
.WillOnce(
|
||||
[](const std::string &, const api_meta_map &meta) -> api_error {
|
||||
EXPECT_NO_THROW(EXPECT_FALSE(meta.at(META_CHANGED).empty()));
|
||||
EXPECT_NO_THROW(EXPECT_FALSE(meta.at(META_MODIFIED).empty()));
|
||||
EXPECT_NO_THROW(EXPECT_FALSE(meta.at(META_WRITTEN).empty()));
|
||||
[](const std::string &, const api_meta_map &meta2) -> api_error {
|
||||
EXPECT_NO_THROW(EXPECT_FALSE(meta2.at(META_CHANGED).empty()));
|
||||
EXPECT_NO_THROW(EXPECT_FALSE(meta2.at(META_MODIFIED).empty()));
|
||||
EXPECT_NO_THROW(EXPECT_FALSE(meta2.at(META_WRITTEN).empty()));
|
||||
return api_error::success;
|
||||
});
|
||||
std::size_t bytes_written{};
|
||||
@ -977,11 +977,11 @@ TEST(file_manager, evict_file_fails_if_file_is_uploading) {
|
||||
.WillRepeatedly(Return(api_error::success));
|
||||
EXPECT_CALL(mp, upload_file)
|
||||
.WillOnce([](const std::string &api_path,
|
||||
const std::string &source_path,
|
||||
const std::string &source_path2,
|
||||
const std::string &encryption_token,
|
||||
stop_type & /*stop_requested*/) -> api_error {
|
||||
EXPECT_STREQ("/test_evict.txt", api_path.c_str());
|
||||
EXPECT_FALSE(source_path.empty());
|
||||
EXPECT_FALSE(source_path2.empty());
|
||||
EXPECT_TRUE(encryption_token.empty());
|
||||
std::this_thread::sleep_for(3s);
|
||||
return api_error::success;
|
||||
|
@ -113,8 +113,8 @@ public:
|
||||
const get_name_callback &get_name,
|
||||
const get_token_callback &get_token, api_file &file) {
|
||||
auto f = std::find_if(list.begin(), list.end(),
|
||||
[&api_path](const auto &f) -> bool {
|
||||
return f.api_path == api_path;
|
||||
[&api_path](const auto &file) -> bool {
|
||||
return file.api_path == api_path;
|
||||
});
|
||||
if (f == list.end()) {
|
||||
return api_error::item_not_found;
|
||||
|
Reference in New Issue
Block a user