Skip to content

Commit

Permalink
Suppress warning on GCC about memcpy into a status_code<void>
Browse files Browse the repository at this point in the history
  • Loading branch information
ned14 committed Sep 20, 2022
1 parent f8d2eeb commit 27ebdf0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion include/llfio/v2.0/status_code.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* LLFIO error handling
(C) 2018-2020 Niall Douglas <http://www.nedproductions.biz/> (24 commits)
(C) 2018-2022 Niall Douglas <http://www.nedproductions.biz/> (24 commits)
File Created: June 2018
Expand Down Expand Up @@ -253,6 +253,10 @@ template <class BaseStatusCodeDomain> class file_io_error_domain : public BaseSt
memcpy(p, ret.c_str(), ret.size() + 1);
return atomic_refcounted_string_ref(p, ret.size());
}
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
virtual bool _do_erased_copy(SYSTEM_ERROR2_NAMESPACE::status_code<void> &dst, const SYSTEM_ERROR2_NAMESPACE::status_code<void> &src,
typename _base::payload_info_t dstinfo) const override
{
Expand All @@ -274,6 +278,9 @@ template <class BaseStatusCodeDomain> class file_io_error_domain : public BaseSt
}
return false;
}
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
};
#if __cplusplus >= 201402L || defined(_MSC_VER)
template <class BaseStatusCodeDomain> constexpr file_io_error_domain<BaseStatusCodeDomain> file_io_error_domain_inst = {};
Expand Down

0 comments on commit 27ebdf0

Please sign in to comment.