From a3cdc510794515f26b7736218041926d3544206a Mon Sep 17 00:00:00 2001 From: arvidn Date: Tue, 1 Oct 2024 17:04:08 +0200 Subject: [PATCH] address GCC false positive warning --- src/torrent_peer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/torrent_peer.cpp b/src/torrent_peer.cpp index dd847b2d46..b84b4b47c5 100644 --- a/src/torrent_peer.cpp +++ b/src/torrent_peer.cpp @@ -108,8 +108,15 @@ namespace libtorrent { offset = std::max(i + 1, size_t(5)); else if (i > offset) { +#if defined __GNUC__ && __GNUC__ >= 7 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif b1[i] &= 0x55; b2[i] &= 0x55; +#if defined __GNUC__ && __GNUC__ >= 7 +#pragma GCC diagnostic pop +#endif } } std::uint64_t addrbuf[4];