Set -Wno-unused-variable for tests (#1682)

We  used assert() a lot in tests and that can cause build breakages in some of the opt builds (since assert() are removed)

it's not practical to sprinkle "(void)" everywhere so I think setting this warning option is the best option for now.
This commit is contained in:
Vy Nguyen 2023-10-20 08:51:32 -04:00 committed by GitHub
parent f30c99a7c8
commit 7495f83e2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,9 @@ TEST_COPTS = [
# "-Wshorten-64-to-32",
"-Wfloat-equal",
"-fstrict-aliasing",
## assert() are used a lot in tests upstream, which may be optimised out leading to
## unused-variable warning.
"-Wno-unused-variable",
]
# Some of the issues with DoNotOptimize only occur when optimization is enabled