Skip to content

Commit

Permalink
fixed a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
finnschiermer committed Oct 27, 2023
1 parent 41911a4 commit d80dcaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/realm/util/file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ class File {
AccessMode m_access_mode = access_ReadOnly;
std::string m_path = "gylle";

MapBase() noexcept = default;
MapBase() = default;
~MapBase() noexcept;

// Disable copying. Copying an opened MapBase will create a scenario
Expand Down Expand Up @@ -749,7 +749,7 @@ class File::Map : private MapBase {
m_reservation_size = other.m_reservation_size;
m_offset = other.m_offset;
m_fd = other.m_fd;
m_path = std::move(other.m_path);
m_path = other.m_path;
other.m_offset = 0;
other.m_addr = nullptr;
other.m_size = other.m_reservation_size = 0;
Expand Down
3 changes: 2 additions & 1 deletion src/realm/util/file_mapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ static std::string dump_logged_mappings()
else
stream << " --M" << std::endl;
}
message = std::move(stream.str());
message = stream.str();
auto logger = Logger::get_default_logger();
logger->fatal(message.data());
return message;
Expand Down Expand Up @@ -602,6 +602,7 @@ void* mmap(const FileAttributes& file, size_t size, size_t offset)
prot = PROT_READ;
break;
case File::access_None:
default:
prot = PROT_NONE;
break;
}
Expand Down

0 comments on commit d80dcaa

Please sign in to comment.