meson: Ignore unused variables when assertions are disabled
authorpal1000 <liviuprodea@yahoo.com>
Mon, 6 Feb 2023 23:35:45 +0000 (01:35 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 7 Feb 2023 08:44:14 +0000 (08:44 +0000)
commit4347072443867f6337c33ffc330263bb851d9839
treeef25e4d80500313b50dc47544056f604c4c233c2
parent4888dd73918aaee71a3b029b5e8fab9d04640274
meson: Ignore unused variables when assertions are disabled

Fixes: 46b099e3
("meson: Ignore unused variables in release builds")

46b099e3 has some issues:
- it doesn't enable unused variables warning on release builds
with assertions enabled;
- it doesn't disable unused variables warning on debug builds
with assertions disabled;
- it doesn't disable unused variables warning when building
with MSVC and assertions are disabled regardless of buildtype,
see #8147. 3/4 regressions reported there have this limitation
alone as root cause.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21154>
meson.build