diff --git a/src/bees-context.cc b/src/bees-context.cc index babee3f..1c82bd7 100644 --- a/src/bees-context.cc +++ b/src/bees-context.cc @@ -969,7 +969,8 @@ BeesContext::tmpfile() if (!m_tmpfiles[this_thread::get_id()]) { m_tmpfiles[this_thread::get_id()] = make_shared(shared_from_this()); } - return m_tmpfiles[this_thread::get_id()]; + auto rv = m_tmpfiles[this_thread::get_id()]; + return rv; } shared_ptr @@ -980,7 +981,8 @@ BeesContext::fd_cache() if (!m_fd_cache) { m_fd_cache = make_shared(); } - return m_fd_cache; + auto rv = m_fd_cache; + return rv; } shared_ptr @@ -991,7 +993,8 @@ BeesContext::roots() if (!m_roots) { m_roots = make_shared(shared_from_this()); } - return m_roots; + auto rv = m_roots; + return rv; } shared_ptr @@ -1002,7 +1005,8 @@ BeesContext::hash_table() if (!m_hash_table) { m_hash_table = make_shared(shared_from_this(), "beeshash.dat"); } - return m_hash_table; + auto rv = m_hash_table; + return rv; } void diff --git a/src/bees-roots.cc b/src/bees-roots.cc index 953f2ea..4fba68d 100644 --- a/src/bees-roots.cc +++ b/src/bees-roots.cc @@ -822,7 +822,8 @@ BeesCrawl::peek_front() if (m_extents.empty()) { return BeesFileRange(); } - return *m_extents.begin(); + auto rv = *m_extents.begin(); + return rv; } BeesFileRange @@ -848,7 +849,8 @@ BeesCrawlState BeesCrawl::get_state() { unique_lock lock(m_state_mutex); - return m_state; + auto rv = m_state; + return rv; } void diff --git a/src/bees-types.cc b/src/bees-types.cc index 95ad945..54a4959 100644 --- a/src/bees-types.cc +++ b/src/bees-types.cc @@ -286,7 +286,8 @@ Fd BeesFileRange::fd() const { unique_lock lock(s_mutex); - return m_fd; + auto rv = m_fd; + return rv; } Fd @@ -310,7 +311,8 @@ BeesFileRange::fd(const shared_ptr &ctx) const } } // We either had a fid and opened it, or we didn't and we're just stuck with our fd - return m_fd; + auto rv = m_fd; + return rv; } BeesFileRange