Skip to content

Commit

Permalink
address GCC false positive warning
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Oct 2, 2024
1 parent 93af9ed commit a3cdc51
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/torrent_peer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit a3cdc51

Please sign in to comment.