diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-06-03 13:44:39 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-06-03 15:25:01 +0200 |
commit | 067603dbda470f4333979ad7027458fc22d6d403 (patch) | |
tree | 4d9f282aa658eb6c43adeed74be19b7414f889a8 /compilerplugins/clang/test/writeonlyvars.cxx | |
parent | a19062084bcc71ff1690f799a2379fe60bdb8c37 (diff) |
-Wunused-but-set-{parameter,variable} in CompilerTest_compilerplugins_clang
...new with Clang trunk 13. As a rule of thumb, this change adds explicit
cast-to-void silencing in those .cxx that already contained other such silencing
casts and adds wholesale #pragma clang diagnostic ignored in all others.
Change-Id: I1884496ee1aa81aaf3c8b3533534a4b69b185e9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116660
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/test/writeonlyvars.cxx')
-rw-r--r-- | compilerplugins/clang/test/writeonlyvars.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compilerplugins/clang/test/writeonlyvars.cxx b/compilerplugins/clang/test/writeonlyvars.cxx index 4c3732867a81..0fc141f62dd2 100644 --- a/compilerplugins/clang/test/writeonlyvars.cxx +++ b/compilerplugins/clang/test/writeonlyvars.cxx @@ -40,6 +40,7 @@ void test() int* m_bar3b; m_bar3 = nullptr; m_bar3b = m_bar3 = nullptr; + (void)m_bar3b; // check that we see reads of field when passed to a function pointer // check that we see read of a field that is a function pointer @@ -91,6 +92,7 @@ void test() // expected-error@+1 {{read any2 [loplugin:writeonlyvars]}} css::uno::Any any2; any2 <<= m_bar10; + (void)any2; }; }; |