aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/abseil-cpp-tstring/y_absl/container/inlined_vector.h
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2024-08-06 11:28:07 +0300
committerthegeorg <thegeorg@yandex-team.com>2024-08-06 12:50:21 +0300
commitde4d7efd8871b850e3ea79164d7661e2299836b7 (patch)
tree47d8cf597b3789a807a4b1cec0a9fd66788767c2 /contrib/restricted/abseil-cpp-tstring/y_absl/container/inlined_vector.h
parente003b4c129e1381591dcb75a96bf9a970b2b47fb (diff)
downloadydb-de4d7efd8871b850e3ea79164d7661e2299836b7.tar.gz
Update contrib/restricted/abseil-cpp-tstring to 20240722.0
83a5727000e16bc5a94523a0cf1cce75fa86a191
Diffstat (limited to 'contrib/restricted/abseil-cpp-tstring/y_absl/container/inlined_vector.h')
-rw-r--r--contrib/restricted/abseil-cpp-tstring/y_absl/container/inlined_vector.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/container/inlined_vector.h b/contrib/restricted/abseil-cpp-tstring/y_absl/container/inlined_vector.h
index f5df597aca..e2a782f460 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/container/inlined_vector.h
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/container/inlined_vector.h
@@ -775,7 +775,20 @@ class InlinedVector {
Y_ABSL_HARDENING_ASSERT(pos >= begin());
Y_ABSL_HARDENING_ASSERT(pos < end());
+ // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102329#c2
+ // It appears that GCC thinks that since `pos` is a const pointer and may
+ // point to uninitialized memory at this point, a warning should be
+ // issued. But `pos` is actually only used to compute an array index to
+ // write to.
+#if !defined(__clang__) && defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#pragma GCC diagnostic ignored "-Wuninitialized"
+#endif
return storage_.Erase(pos, pos + 1);
+#if !defined(__clang__) && defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
}
// Overload of `InlinedVector::erase(...)` that erases every element in the