Skip to content

Commit

Permalink
Set -Wno-unused-variable for tests (#1682)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
oontvoo committed Oct 20, 2023
1 parent f30c99a commit 7495f83
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7495f83

Please sign in to comment.