Skip to content

Commit

Permalink
suppress warning in buffer_concat
Browse files Browse the repository at this point in the history
  • Loading branch information
anarthal committed Oct 27, 2023
1 parent 38f6d9d commit a84bb18
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/common/include/test_common/buffer_concat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#ifndef BOOST_MYSQL_TEST_COMMON_INCLUDE_TEST_COMMON_BUFFER_CONCAT_HPP
#define BOOST_MYSQL_TEST_COMMON_INCLUDE_TEST_COMMON_BUFFER_CONCAT_HPP

#include <boost/config.hpp>
#include <boost/core/span.hpp>

#include <cstdint>
Expand All @@ -19,9 +20,10 @@ namespace mysql {
namespace test {

// ARM gcc raises a spurious warning here
#ifdef BOOST_GCC
#if BOOST_GCC >= 110000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#pragma GCC diagnostic ignored "-Wrestrict"
#endif
inline void concat(std::vector<std::uint8_t>& lhs, span<const std::uint8_t> rhs)
{
Expand All @@ -32,7 +34,7 @@ inline void concat(std::vector<std::uint8_t>& lhs, span<const std::uint8_t> rhs)
std::memcpy(lhs.data() + current_size, rhs.data(), rhs.size());
}
}
#ifdef BOOST_GCC
#if BOOST_GCC >= 110000
#pragma GCC diagnostic pop
#endif

Expand Down

0 comments on commit a84bb18

Please sign in to comment.