[Libreoffice-commits] core.git: compilerplugins/clang

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 31 13:13:49 UTC 2019


 compilerplugins/clang/test/unusedfields.cxx |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 8949f98d16a32d7c4fe1ad6ec2073d71f9a2de4c
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Jan 31 11:51:39 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Jan 31 14:13:22 2019 +0100

    loplugin:unusedfileds is no-op on Windows, so don't run its test there
    
    But nevertheless, make sure that the variables m_bar9/10 used in combination
    with css::uno::Any have UNO-compatible type.
    
    Change-Id: I241d8b5d37de60b00b5bfdc69e642872b28e8ee2
    Reviewed-on: https://gerrit.libreoffice.org/67201
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/compilerplugins/clang/test/unusedfields.cxx b/compilerplugins/clang/test/unusedfields.cxx
index 37cd9ac89b91..60560b9fedc5 100644
--- a/compilerplugins/clang/test/unusedfields.cxx
+++ b/compilerplugins/clang/test/unusedfields.cxx
@@ -7,6 +7,10 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#if defined _WIN32 //TODO, see corresponding TODO in compilerplugins/clang/unusedfields.cxx
+// expected-no-diagnostics
+#else
+
 #include <vector>
 #include <ostream>
 #include <com/sun/star/uno/Any.hxx>
@@ -45,8 +49,8 @@ struct Bar
     int m_bar7[5];
     int m_bar8;
     int m_barstream;
-    int m_bar9;
-    int m_bar10;
+    sal_Int32 m_bar9;
+    sal_Int32 m_bar10;
 
     // check that we see reads of fields like m_foo1 when referred to via constructor initializer
     Bar(Foo const & foo) : m_bar1(foo.m_foo1) {}
@@ -195,4 +199,6 @@ struct ReadOnlyAnalysis4
     }
 };
 
+#endif
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */


More information about the Libreoffice-commits mailing list