From 9086a4bbd38b9a5320525392affe495e7772796a Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 2 Oct 2014 18:42:07 +0200 Subject: remove checks of __GCC_MINOR__ that are always true in GCC 4.6 or later Change-Id: I4412a0c1e4dee94cd717f24b8df5e257d895f721 --- l10ntools/source/cfglex.l | 2 -- l10ntools/source/srclex.l | 2 -- l10ntools/source/xrmlex.l | 2 -- sal/osl/unx/signal.c | 4 ++-- sal/qa/rtl/strings/test_ostring_concat.cxx | 2 +- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/l10ntools/source/cfglex.l b/l10ntools/source/cfglex.l index 0fe951c0ff37..663070ab2d29 100644 --- a/l10ntools/source/cfglex.l +++ b/l10ntools/source/cfglex.l @@ -47,9 +47,7 @@ #if __GNUC__ #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-label" -#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #pragma GCC diagnostic ignored "-Wunused-but-set-variable" -#endif #elif defined _MSC_VER #pragma warning(push, 1) #endif diff --git a/l10ntools/source/srclex.l b/l10ntools/source/srclex.l index 0985b431f04c..979df7512924 100644 --- a/l10ntools/source/srclex.l +++ b/l10ntools/source/srclex.l @@ -48,9 +48,7 @@ #ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-label" -#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #pragma GCC diagnostic ignored "-Wunused-but-set-variable" -#endif #elif defined _MSC_VER #pragma warning(push, 1) #endif diff --git a/l10ntools/source/xrmlex.l b/l10ntools/source/xrmlex.l index ec00468de4d9..0d4bb4d48573 100644 --- a/l10ntools/source/xrmlex.l +++ b/l10ntools/source/xrmlex.l @@ -46,9 +46,7 @@ #ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-label" -#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #pragma GCC diagnostic ignored "-Wunused-but-set-variable" -#endif #elif defined _MSC_VER #pragma warning(push, 1) #endif diff --git a/sal/osl/unx/signal.c b/sal/osl/unx/signal.c index d8d2190efdb0..ba4a32579d9b 100644 --- a/sal/osl/unx/signal.c +++ b/sal/osl/unx/signal.c @@ -893,14 +893,14 @@ static void DUMPCURRENTALLOCS(void) { VALGRIND_PRINTF( "=== start memcheck dump of active allocations ===\n" ); -#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#ifdef __GNUC__ # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif VALGRIND_DO_LEAK_CHECK; -#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#ifdef __GNUC__ # pragma GCC diagnostic pop #endif diff --git a/sal/qa/rtl/strings/test_ostring_concat.cxx b/sal/qa/rtl/strings/test_ostring_concat.cxx index 9c5cbd940bbc..7988a3be6992 100644 --- a/sal/qa/rtl/strings/test_ostring_concat.cxx +++ b/sal/qa/rtl/strings/test_ostring_concat.cxx @@ -83,7 +83,7 @@ void test::ostring::StringConcat::checkConcat() TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OString, const char* > )), typeid( OString( "foo" ) + d3 )); CPPUNIT_ASSERT_EQUAL( OString( "fooabc" ), OString( OString( "foo" ) + d4 )); TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OString, char* > )), typeid( OString( "foo" ) + d4 )); -#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ > 1 ) +#ifdef __GNUC__ CPPUNIT_ASSERT_EQUAL( OString( "foobar" ), OString( OStringBuffer( "foo" ) + OString( "bar" ))); TYPES_ASSERT_EQUAL(( typeid( OStringConcat< OStringBuffer, OString > )), typeid( OStringBuffer( "foo" ) + OString( "bar" ))); #endif -- cgit