diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2023-05-03 17:53:47 +0300 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2023-05-04 02:03:51 +0300 |
commit | 5c71312ba307a9b9c2637484c06bbe1cbe298b0e (patch) | |
tree | abcfe1aa9cc9ecb49f34f6b05504b8061c2be073 | |
parent | 87e90a265f6b07b489ea249cc00b46f13e879d83 (diff) |
Suppress a redundant GCC warning
The test is accessing an out of bounds index into an array on purpose.
Change-Id: I23cce4093fdfabd177eb34639f26fcd6752c8b34
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
-rw-r--r-- | tests/auto/testlib/selftests/crashes/tst_crashes.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp index 38ed27d331..173b8a4aeb 100644 --- a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp +++ b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp @@ -38,7 +38,11 @@ void tst_Crashes::crash() rather than SIGSEGV). */ int *i = 0; + +QT_WARNING_PUSH +QT_WARNING_DISABLE_GCC("-Warray-bounds") i[1] = 1; +QT_WARNING_POP } QTEST_MAIN(tst_Crashes) |