3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-10 02:50:55 +00:00

Merge pull request #8509 from Z3Prover/copilot/fix-build-warnings

Fix compiler warnings: unused variables, uninitialized variable, and false positive array bounds
This commit is contained in:
Nikolaj Bjorner 2026-02-07 05:10:02 -08:00 committed by GitHub
commit 8978f1549b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 11 additions and 5 deletions

View file

@ -405,7 +405,14 @@ public:
if (CallDestructors) {
back().~T();
}
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif
reinterpret_cast<SZ *>(m_data)[SIZE_IDX]--;
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
}
vector& push_back(T const & elem) {