[Libreoffice-commits] core.git: 5 commits - bridges/source include/cppuhelper sal/qa soltools/cpp soltools/mkdepend
Stephan Bergmann
sbergman at redhat.com
Fri Mar 4 07:58:51 UTC 2016
bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx | 3 +--
include/cppuhelper/implbase1.hxx | 6 ++++++
include/cppuhelper/implbase10.hxx | 6 ++++++
include/cppuhelper/implbase11.hxx | 6 ++++++
include/cppuhelper/implbase12.hxx | 6 ++++++
include/cppuhelper/implbase13.hxx | 6 ++++++
include/cppuhelper/implbase2.hxx | 6 ++++++
include/cppuhelper/implbase3.hxx | 6 ++++++
include/cppuhelper/implbase4.hxx | 6 ++++++
include/cppuhelper/implbase5.hxx | 6 ++++++
include/cppuhelper/implbase6.hxx | 6 ++++++
include/cppuhelper/implbase7.hxx | 6 ++++++
include/cppuhelper/implbase8.hxx | 6 ++++++
include/cppuhelper/implbase9.hxx | 6 ++++++
include/cppuhelper/propshlp.hxx | 13 +++++++++++++
sal/qa/osl/file/osl_old_test_file.cxx | 3 ---
soltools/cpp/_include.c | 3 ---
soltools/cpp/_macro.c | 3 ---
soltools/mkdepend/imakemdep.h | 2 +-
19 files changed, 93 insertions(+), 12 deletions(-)
New commits:
commit c665a1bc0f45aa4a4c679e6f004581168e03f93d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Mar 4 08:54:46 2016 +0100
-Werror,-Wundef
For MSVC/clang-cl: "__STDC__: Indicates conformance with the ANSI/ISO C99
tandard. Defined as the integer literal constant 1 only if the /Za compiler
option is given and you are not compiling C++ code; otherwise is undefined."
(<https://msdn.microsoft.com/en-us/library/b0084kay.aspx>)
Presumably fine to just replace #if with #ifdef here (as is used in all the
other cases surrounding it), and not care whether it actually expands to true.
Change-Id: Ie58c76d7e72321b06a11a370fd28221e85fcf871
diff --git a/soltools/mkdepend/imakemdep.h b/soltools/mkdepend/imakemdep.h
index 6211da6..36fd5b8 100644
--- a/soltools/mkdepend/imakemdep.h
+++ b/soltools/mkdepend/imakemdep.h
@@ -566,7 +566,7 @@ struct pair predefs[] = {
#ifdef __GNUC__
{"__GNUC__", "1", NULL},
#endif
-#if __STDC__
+#ifdef __STDC__
{"__STDC__", "1", NULL},
#endif
#ifdef __HIGHC__
commit cd8e720b0602434480e84d492346fa68419c3df0
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Mar 4 08:52:43 2016 +0100
-Werror,-Wunused-macros
Whatever those _POSIX_ for _MSV_VER were supposed to be good for (have been in
there at least ever since 4f4b74153d27a9579c49b225b2690e7f9416fe78 "Moved cpp
from cpp to soltools"), but cause -Wunused-macros at least when building with
clang-cl.
Change-Id: I356bf663cd1e86298ba72a179f46bb9d0c10016b
diff --git a/soltools/cpp/_include.c b/soltools/cpp/_include.c
index 2d4b919..1ddba80 100644
--- a/soltools/cpp/_include.c
+++ b/soltools/cpp/_include.c
@@ -23,9 +23,6 @@
# include <unistd.h>
#endif
-#ifdef _MSC_VER
-# define _POSIX_
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/soltools/cpp/_macro.c b/soltools/cpp/_macro.c
index 318b7f1..70b6ba8 100644
--- a/soltools/cpp/_macro.c
+++ b/soltools/cpp/_macro.c
@@ -17,9 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifdef _MSC_VER
-# define _POSIX_
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
commit 3c53b783f3578ffe26e5812c00ba7bffb41bfa86
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Mar 4 08:50:48 2016 +0100
-Werror,-Wunused-macros
Change-Id: I5402d52ec42fa27c58b276eeb22eeb270c3d7948
diff --git a/sal/qa/osl/file/osl_old_test_file.cxx b/sal/qa/osl/file/osl_old_test_file.cxx
index 8db4b25..24c96def 100644
--- a/sal/qa/osl/file/osl_old_test_file.cxx
+++ b/sal/qa/osl/file/osl_old_test_file.cxx
@@ -26,9 +26,6 @@
#include <string.h>
#include <sys/stat.h>
#define TEST_VOLUME ""
-#else
-// WINDOWS
-#define TEST_VOLUME "c:/"
#endif
#include <cppunit/TestFixture.h>
commit 2e73ae7a62013ce896d237809703f6efc1c8dabe
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Mar 4 08:50:11 2016 +0100
-Werror,-Wshadow
Change-Id: Ib20a02a846b745b65ffcf9ec1d45b39a6e0c50e4
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
index ebec49e..f16e0d4 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -625,8 +625,7 @@ RaiseInfo::RaiseInfo(typelib_TypeDescription * pTD)throw ()
for (pCompTD = (typelib_CompoundTypeDescription*)pTD;
pCompTD; pCompTD = pCompTD->pBaseTypeDescription)
{
- typelib_TypeDescription * pTD = (typelib_TypeDescription *)pCompTD;
- int typeInfoLen = mscx_getRTTI_len(pTD->pTypeName);
+ int typeInfoLen = mscx_getRTTI_len(pCompTD->aBase.pTypeName);
// Mem has to be on 4-byte Boundary
if (typeInfoLen % 4 != 0)
{
commit 4b5efd930895c87829f1fc404bfc5de8f139f873
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Mar 4 08:49:44 2016 +0100
Silence -Werror,-Wnon-virtual-dtor (clang-cl)
Change-Id: Icac0f029461c886ebb03aedcd54189116b66d8a3
diff --git a/include/cppuhelper/implbase1.hxx b/include/cppuhelper/implbase1.hxx
index 6a51826..61022f2 100644
--- a/include/cppuhelper/implbase1.hxx
+++ b/include/cppuhelper/implbase1.hxx
@@ -78,8 +78,14 @@ namespace cppu
#if !defined _MSC_VER // public -> protected changes mangled names there
protected:
+#elif defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
~ImplHelper1() throw () {}
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic pop
+#endif
};
/** Implementation helper implementing interfaces css::lang::XTypeProvider and
css::uno::XInterface which supports weak mechanism to be held weakly
diff --git a/include/cppuhelper/implbase10.hxx b/include/cppuhelper/implbase10.hxx
index 30af2e9..986e800 100644
--- a/include/cppuhelper/implbase10.hxx
+++ b/include/cppuhelper/implbase10.hxx
@@ -88,8 +88,14 @@ namespace cppu
#if !defined _MSC_VER // public -> protected changes mangled names there
protected:
+#elif defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
~ImplHelper10() throw () {}
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic pop
+#endif
};
/** Implementation helper implementing interfaces css::lang::XTypeProvider and
css::uno::XInterface which supports weak mechanism to be held weakly
diff --git a/include/cppuhelper/implbase11.hxx b/include/cppuhelper/implbase11.hxx
index 21ca4b1..6375a3f 100644
--- a/include/cppuhelper/implbase11.hxx
+++ b/include/cppuhelper/implbase11.hxx
@@ -89,8 +89,14 @@ namespace cppu
#if !defined _MSC_VER // public -> protected changes mangled names there
protected:
+#elif defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
~ImplHelper11() throw () {}
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic pop
+#endif
};
/** Implementation helper implementing interfaces css::lang::XTypeProvider and
css::uno::XInterface which supports weak mechanism to be held weakly
diff --git a/include/cppuhelper/implbase12.hxx b/include/cppuhelper/implbase12.hxx
index 6ba5168..b3d02e4 100644
--- a/include/cppuhelper/implbase12.hxx
+++ b/include/cppuhelper/implbase12.hxx
@@ -90,8 +90,14 @@ namespace cppu
#if !defined _MSC_VER // public -> protected changes mangled names there
protected:
+#elif defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
~ImplHelper12() throw () {}
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic pop
+#endif
};
/** Implementation helper implementing interfaces css::lang::XTypeProvider and
css::uno::XInterface which supports weak mechanism to be held weakly
diff --git a/include/cppuhelper/implbase13.hxx b/include/cppuhelper/implbase13.hxx
index da99200..aa08929 100644
--- a/include/cppuhelper/implbase13.hxx
+++ b/include/cppuhelper/implbase13.hxx
@@ -91,8 +91,14 @@ namespace cppu
#if !defined _MSC_VER // public -> protected changes mangled names there
protected:
+#elif defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
~ImplHelper13() throw () {}
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic pop
+#endif
};
/** Implementation helper implementing interfaces css::lang::XTypeProvider and
css::uno::XInterface which supports weak mechanism to be held weakly
diff --git a/include/cppuhelper/implbase2.hxx b/include/cppuhelper/implbase2.hxx
index 6aa86e7..f41746e 100644
--- a/include/cppuhelper/implbase2.hxx
+++ b/include/cppuhelper/implbase2.hxx
@@ -79,8 +79,14 @@ namespace cppu
#if !defined _MSC_VER // public -> protected changes mangled names there
protected:
+#elif defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
~ImplHelper2() throw () {}
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic pop
+#endif
};
/** Implementation helper implementing interfaces css::lang::XTypeProvider and
css::uno::XInterface which supports weak mechanism to be held weakly
diff --git a/include/cppuhelper/implbase3.hxx b/include/cppuhelper/implbase3.hxx
index 2e03cf4..691bfb3 100644
--- a/include/cppuhelper/implbase3.hxx
+++ b/include/cppuhelper/implbase3.hxx
@@ -80,8 +80,14 @@ namespace cppu
#if !defined _MSC_VER // public -> protected changes mangled names there
protected:
+#elif defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
~ImplHelper3() throw () {}
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic pop
+#endif
};
/** Implementation helper implementing interfaces css::lang::XTypeProvider and
css::uno::XInterface which supports weak mechanism to be held weakly
diff --git a/include/cppuhelper/implbase4.hxx b/include/cppuhelper/implbase4.hxx
index 0cd0881..6453543 100644
--- a/include/cppuhelper/implbase4.hxx
+++ b/include/cppuhelper/implbase4.hxx
@@ -82,8 +82,14 @@ namespace cppu
#if !defined _MSC_VER // public -> protected changes mangled names there
protected:
+#elif defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
~ImplHelper4() throw () {}
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic pop
+#endif
};
/** Implementation helper implementing interfaces css::lang::XTypeProvider and
css::uno::XInterface which supports weak mechanism to be held weakly
diff --git a/include/cppuhelper/implbase5.hxx b/include/cppuhelper/implbase5.hxx
index de58cc4..792593a 100644
--- a/include/cppuhelper/implbase5.hxx
+++ b/include/cppuhelper/implbase5.hxx
@@ -83,8 +83,14 @@ namespace cppu
#if !defined _MSC_VER // public -> protected changes mangled names there
protected:
+#elif defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
~ImplHelper5() throw () {}
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic pop
+#endif
};
/** Implementation helper implementing interfaces css::lang::XTypeProvider and
css::uno::XInterface which supports weak mechanism to be held weakly
diff --git a/include/cppuhelper/implbase6.hxx b/include/cppuhelper/implbase6.hxx
index 6bc8574..eef8123 100644
--- a/include/cppuhelper/implbase6.hxx
+++ b/include/cppuhelper/implbase6.hxx
@@ -84,8 +84,14 @@ namespace cppu
#if !defined _MSC_VER // public -> protected changes mangled names there
protected:
+#elif defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
~ImplHelper6() throw () {}
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic pop
+#endif
};
/** Implementation helper implementing interfaces css::lang::XTypeProvider and
css::uno::XInterface which supports weak mechanism to be held weakly
diff --git a/include/cppuhelper/implbase7.hxx b/include/cppuhelper/implbase7.hxx
index e0b5f7b..f83bc66 100644
--- a/include/cppuhelper/implbase7.hxx
+++ b/include/cppuhelper/implbase7.hxx
@@ -85,8 +85,14 @@ namespace cppu
#if !defined _MSC_VER // public -> protected changes mangled names there
protected:
+#elif defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
~ImplHelper7() throw () {}
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic pop
+#endif
};
/** Implementation helper implementing interfaces css::lang::XTypeProvider and
css::uno::XInterface which supports weak mechanism to be held weakly
diff --git a/include/cppuhelper/implbase8.hxx b/include/cppuhelper/implbase8.hxx
index 6f14db5..3ab86d8 100644
--- a/include/cppuhelper/implbase8.hxx
+++ b/include/cppuhelper/implbase8.hxx
@@ -86,8 +86,14 @@ namespace cppu
#if !defined _MSC_VER // public -> protected changes mangled names there
protected:
+#elif defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
~ImplHelper8() throw () {}
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic pop
+#endif
};
/** Implementation helper implementing interfaces css::lang::XTypeProvider and
css::uno::XInterface which supports weak mechanism to be held weakly
diff --git a/include/cppuhelper/implbase9.hxx b/include/cppuhelper/implbase9.hxx
index 507f2b7..e970f72 100644
--- a/include/cppuhelper/implbase9.hxx
+++ b/include/cppuhelper/implbase9.hxx
@@ -87,8 +87,14 @@ namespace cppu
#if !defined _MSC_VER // public -> protected changes mangled names there
protected:
+#elif defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
~ImplHelper9() throw () {}
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic pop
+#endif
};
/** Implementation helper implementing interfaces css::lang::XTypeProvider and
css::uno::XInterface which supports weak mechanism to be held weakly
diff --git a/include/cppuhelper/propshlp.hxx b/include/cppuhelper/propshlp.hxx
index 77dbc27..0130688 100644
--- a/include/cppuhelper/propshlp.hxx
+++ b/include/cppuhelper/propshlp.hxx
@@ -335,9 +335,15 @@ public:
#if !defined _MSC_VER // public -> protected changes mangled names there
protected:
+#elif defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
~IEventNotificationHook() {}
// avoid warnings about virtual members and non-virtual dtor
+#if defined _MSC_VER && defined __clang__
+#pragma clang diagnostic pop
+#endif
};
@@ -672,6 +678,10 @@ protected:
#if defined _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4265)
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#endif
#endif
/**
You must call disposing before destruction.
@@ -679,6 +689,9 @@ protected:
~OPropertySetHelper();
};
#if defined _MSC_VER
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
#pragma warning(pop)
#endif
More information about the Libreoffice-commits
mailing list