From 067603dbda470f4333979ad7027458fc22d6d403 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 3 Jun 2021 13:44:39 +0200 Subject: -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 --- compilerplugins/clang/test/writeonlyvars.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compilerplugins/clang/test/writeonlyvars.cxx') 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; }; }; -- cgit