Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2021-02-03 00:17:12 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2021-02-03 00:17:12 +0300
commitfc3aba2e135c8b31d00f7061a2d1068a326c3ff7 (patch)
tree0391526a917500685cec874bc28772c8a5840a36
parent669e0b45bbc60cf4d46a72559710d428f2863740 (diff)
Suppress spurious warning on older GCCs.
-rw-r--r--include/llfio/v2.0/handle.hpp11
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