James Kuszmaul | b13e13f | 2023-11-22 20:44:04 -0800 | [diff] [blame] | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | From: Tyler Veness <calcmogul@gmail.com> |
| 3 | Date: Tue, 16 May 2023 13:49:18 -0700 |
Maxwell Henderson | 80bec32 | 2024-01-09 15:48:44 -0800 | [diff] [blame^] | 4 | Subject: [PATCH 2/3] Suppress warnings we can't fix |
James Kuszmaul | b13e13f | 2023-11-22 20:44:04 -0800 | [diff] [blame] | 5 | |
| 6 | --- |
| 7 | include/fmt/format.h | 7 +++++++ |
| 8 | 1 file changed, 7 insertions(+) |
| 9 | |
| 10 | diff --git a/include/fmt/format.h b/include/fmt/format.h |
Maxwell Henderson | 80bec32 | 2024-01-09 15:48:44 -0800 | [diff] [blame^] | 11 | index 87a34b972ce6af4e2209e4d6cf78e8401e8f0037..ac0f52def2f3e2bc88d11903f5532efd89af454d 100644 |
James Kuszmaul | b13e13f | 2023-11-22 20:44:04 -0800 | [diff] [blame] | 12 | --- a/include/fmt/format.h |
| 13 | +++ b/include/fmt/format.h |
| 14 | @@ -1324,7 +1324,14 @@ inline auto equal2(const char* lhs, const char* rhs) -> bool { |
| 15 | template <typename Char> |
| 16 | FMT_CONSTEXPR20 FMT_INLINE void copy2(Char* dst, const char* src) { |
| 17 | if (!is_constant_evaluated() && sizeof(Char) == sizeof(char)) { |
| 18 | +#if FMT_GCC_VERSION && FMT_GCC_VERSION >= 1000 |
| 19 | +# pragma GCC diagnostic push |
| 20 | +# pragma GCC diagnostic ignored "-Wstringop-overflow" |
| 21 | +#endif |
| 22 | memcpy(dst, src, 2); |
| 23 | +#if FMT_GCC_VERSION && FMT_GCC_VERSION >= 1000 |
| 24 | +# pragma GCC diagnostic pop |
| 25 | +#endif |
| 26 | return; |
| 27 | } |
| 28 | *dst++ = static_cast<Char>(*src++); |