diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2021-02-03 00:17:12 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2021-02-03 00:17:12 +0300 |
commit | fc3aba2e135c8b31d00f7061a2d1068a326c3ff7 (patch) | |
tree | 0391526a917500685cec874bc28772c8a5840a36 | |
parent | 669e0b45bbc60cf4d46a72559710d428f2863740 (diff) |
Suppress spurious warning on older GCCs.
-rw-r--r-- | include/llfio/v2.0/handle.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llfio/v2.0/handle.hpp b/include/llfio/v2.0/handle.hpp index 2511847b..c5f99beb 100644 --- a/include/llfio/v2.0/handle.hpp +++ b/include/llfio/v2.0/handle.hpp @@ -568,7 +568,18 @@ namespace detail #pragma warning(push) #pragma warning(disable : 4996) // the function may be unsafe #endif +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif + // The type in TLS is char paths[190][16]{}; + // If I index that by paths[x], I get back a type of char(&)[190]. + // See https://godbolt.org/z/d69xzd for proof. + // So I don't know why there is a warning here about overflowing a buffer of 16! strncpy(tls.next(dest._tls_path_id1), QUICKCPPLIB_NAMESPACE::ringbuffer_log::last190(currentpath), 190); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif #ifdef _MSC_VER #pragma warning(pop) #endif |