diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-03-23 21:55:27 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-03-25 08:52:54 +0100 |
commit | fa545023ada3f2a5f79cab1ff628fd18434c7c2e (patch) | |
tree | 7bb5c0f01264f9b53724baa1b0ef7b7e80e23b3d /fpicker/source | |
parent | Remove unused macros from checked-in Flex/Bison output (diff) | |
download | core-fa545023ada3f2a5f79cab1ff628fd18434c7c2e.tar.gz core-fa545023ada3f2a5f79cab1ff628fd18434c7c2e.zip |
Introduce HAVE_GCC_PRAGMA_DIAGNOSTIC_{MODIFY,SCOPE}
...replacing hard-coded GCC version checks. Those checks that guard
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
appear relevant only for GCC itself, not Clang (which used to fail the old
guards because it typically announces itself with a rather low
__GNUC__/__GNUC_MINOR__ version), see 6e67c03dc0225fc66343546b14e902b9d238b1a3
"Enable -Wnon-virtual-dtor for GCC 4.6"
Change-Id: I6bfa4d5caa6192e7a203ce829682bf6bb8d61a1b
Diffstat (limited to 'fpicker/source')
-rw-r--r-- | fpicker/source/aqua/FilterHelper.mm | 12 | ||||
-rw-r--r-- | fpicker/source/aqua/SalAquaFilePicker.mm | 6 | ||||
-rw-r--r-- | fpicker/source/aqua/SalAquaPicker.mm | 6 |
3 files changed, 12 insertions, 12 deletions
diff --git a/fpicker/source/aqua/FilterHelper.mm b/fpicker/source/aqua/FilterHelper.mm index b076990b3f83..fd0e47b4a25d 100644 --- a/fpicker/source/aqua/FilterHelper.mm +++ b/fpicker/source/aqua/FilterHelper.mm @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "sal/config.h" + #include <functional> #include <algorithm> #include <osl/mutex.hxx> @@ -374,14 +376,8 @@ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno:: } // 'fileAttributesAtPath:traverseLink:' is deprecated -#if defined LIBO_WERROR && defined __GNUC__ -#define GCC_VERSION (__GNUC__ * 10000 \ - + __GNUC_MINOR__ * 100 \ - + __GNUC_PATCHLEVEL__) -#if GCC_VERSION >= 40201 +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY #pragma GCC diagnostic warning "-Wdeprecated-declarations" -#define DID_TURN_OFF_DEPRECATED_DECLARATIONS_WARNING -#endif #endif sal_Bool FilterHelper::filenameMatchesFilter(NSString* sFilename) @@ -440,7 +436,7 @@ sal_Bool FilterHelper::filenameMatchesFilter(NSString* sFilename) return sal_False; } -#ifdef DID_TURN_OFF_DEPRECATED_DECLARATIONS_WARNING +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY #pragma GCC diagnostic error "-Wdeprecated-declarations" #endif diff --git a/fpicker/source/aqua/SalAquaFilePicker.mm b/fpicker/source/aqua/SalAquaFilePicker.mm index 119c00d7d22d..8d1d5bc42ef6 100644 --- a/fpicker/source/aqua/SalAquaFilePicker.mm +++ b/fpicker/source/aqua/SalAquaFilePicker.mm @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "sal/config.h" + #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> @@ -769,12 +771,12 @@ void SalAquaFilePicker::updateSaveFileNameExtension() { rtl::OUString suffix = (*(aStringList.begin())).copy(1); NSString *requiredFileType = [NSString stringWithOUString:suffix]; -#if defined(LIBO_WERROR) && defined(__clang__) && MACOSX_SDK_VERSION >= 1070 +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE #pragma GCC diagnostic push #pragma GCC diagnostic warning "-Wdeprecated-declarations" #endif [m_pDialog setRequiredFileType:requiredFileType]; -#if defined(LIBO_WERROR) && defined(__clang__) && MACOSX_SDK_VERSION >= 1070 +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE #pragma GCC diagnostic pop #endif diff --git a/fpicker/source/aqua/SalAquaPicker.mm b/fpicker/source/aqua/SalAquaPicker.mm index 9fdc8486a38f..b4a39d46a174 100644 --- a/fpicker/source/aqua/SalAquaPicker.mm +++ b/fpicker/source/aqua/SalAquaPicker.mm @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "sal/config.h" + #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <cppuhelper/interfacecontainer.h> @@ -176,7 +178,7 @@ int SalAquaPicker::run() startDirectory = NSHomeDirectory(); } -#if defined(LIBO_WERROR) && defined(__clang__) && MACOSX_SDK_VERSION >= 1070 +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE #pragma GCC diagnostic push #pragma GCC diagnostic warning "-Wdeprecated-declarations" #endif @@ -199,7 +201,7 @@ int SalAquaPicker::run() implsetDisplayDirectory([[NSURL fileURLWithPath:pDir] OUStringForInfo:FULLPATH]); } } -#if defined(LIBO_WERROR) && defined(__clang__) && MACOSX_SDK_VERSION >= 1070 +#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY && HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE #pragma GCC diagnostic pop #endif DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal); |