summaryrefslogtreecommitdiff
path: root/vcl/aqua
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2011-09-28 17:29:27 +0300
committerTor Lillqvist <tml@iki.fi>2011-09-28 17:43:41 +0300
commit69a1f550625b967c34a1468c7e83e22003bb0796 (patch)
tree2e3b839ee3f2cfa592cbc65a9284e349a3be7225 /vcl/aqua
parent6904e7d8ba33e09e9254b7d569205ef2b4d8f9bb (diff)
Make deprecation warnings non-fatal even in a -Werror compilation
Diffstat (limited to 'vcl/aqua')
-rw-r--r--vcl/aqua/source/dtrans/DataFlavorMapping.cxx8
-rw-r--r--vcl/aqua/source/gdi/aquaprintaccessoryview.mm8
-rw-r--r--vcl/aqua/source/gdi/salatslayout.cxx4
-rw-r--r--vcl/aqua/source/gdi/salatsuifontutils.cxx4
-rw-r--r--vcl/aqua/source/gdi/salgdi.cxx4
5 files changed, 16 insertions, 12 deletions
diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
index 7d55f071128e..2e2e0c2a8423 100644
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
@@ -126,13 +126,15 @@ namespace // private
// NSPICTPboardType is deprecated in 10.6 and later
-#if defined __GNUC__
+// Make deprecation warnings just warnings even in a -Werror
+// compilation.
+
+#if defined LIBO_WERROR && defined __GNUC__
#define GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
#if GCC_VERSION >= 40201
-// #pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#endif
#endif
diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
index 1afad67fd1f3..728b83ffb21f 100644
--- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
+++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
@@ -1107,13 +1107,15 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
// In 10.5 and later:
// 'setAccessoryView:' is deprecated
-#if defined __GNUC__
+// Make deprecation warnings just warnings in a -Werror compilation.
+
+#if defined LIBO_WERROR && defined __GNUC__
#define GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
#if GCC_VERSION >= 40201
// #pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#endif
#endif
@@ -1402,7 +1404,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
return pCtrlTarget;
}
-#if defined __GNUC__ && GCC_VERSION >= 40201
+#if defined LIBO_WERROR && defined __GNUC__ && GCC_VERSION >= 40201
// #pragma GCC diagnostic pop
#endif
diff --git a/vcl/aqua/source/gdi/salatslayout.cxx b/vcl/aqua/source/gdi/salatslayout.cxx
index 21fbba1eed42..a41d40d3d173 100644
--- a/vcl/aqua/source/gdi/salatslayout.cxx
+++ b/vcl/aqua/source/gdi/salatslayout.cxx
@@ -38,12 +38,12 @@
#include <math.h>
// ATSUI is deprecated in 10.6 (or already 10.5?)
-#if defined __GNUC__
+#if defined LIBO_WERROR && defined __GNUC__
#define GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
#if GCC_VERSION >= 40201
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#endif
#endif
diff --git a/vcl/aqua/source/gdi/salatsuifontutils.cxx b/vcl/aqua/source/gdi/salatsuifontutils.cxx
index c92fec6705db..e124b3c0763d 100644
--- a/vcl/aqua/source/gdi/salatsuifontutils.cxx
+++ b/vcl/aqua/source/gdi/salatsuifontutils.cxx
@@ -40,12 +40,12 @@
#include "aqua/salatsuifontutils.hxx"
// ATSUI is deprecated in 10.6 (or already 10.5?)
-#if defined __GNUC__
+#if defined LIBO_WERROR && defined __GNUC__
#define GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
#if GCC_VERSION >= 40201
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#endif
#endif
diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index 6b1a64c03187..19f073d78a98 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -67,12 +67,12 @@ typedef std::vector<unsigned char> ByteVector;
// ATSUI is deprecated in 10.6 (or already 10.5?)
-#if defined __GNUC__
+#if defined LIBO_WERROR && defined __GNUC__
#define GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
#if GCC_VERSION >= 40201
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#endif
#endif