From 8de63bac75a73011b7de19d730413adf1fbfd50f Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 10 Feb 2012 13:34:57 +0100 Subject: -Werror=sign-promo from cppunit --- cppunit/cppunit-1.12.1-warnings.patch | 19 +++++++++++++++++++ cppunit/makefile.mk | 4 +++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 cppunit/cppunit-1.12.1-warnings.patch (limited to 'cppunit') diff --git a/cppunit/cppunit-1.12.1-warnings.patch b/cppunit/cppunit-1.12.1-warnings.patch new file mode 100644 index 000000000000..8941de76d124 --- /dev/null +++ b/cppunit/cppunit-1.12.1-warnings.patch @@ -0,0 +1,19 @@ +--- misc/cppunit-1.12.1/include/cppunit/TestAssert.h 2012-02-10 12:34:26.564961982 +0100 ++++ misc/build/cppunit-1.12.1/include/cppunit/TestAssert.h 2012-02-10 12:33:57.660131866 +0100 +@@ -46,7 +46,16 @@ + static std::string toString( const T& x ) + { + OStringStream ost; ++// Work around "passing 'T' chooses 'int' over 'unsigned int'" warnings when T ++// is an enum type: ++#if defined __GNUC__ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wsign-promo" ++#endif + ost << x; ++#if defined __GNUC__ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) ++#pragma GCC diagnostic pop ++#endif + return ost.str(); + } + }; diff --git a/cppunit/makefile.mk b/cppunit/makefile.mk index 0be4d457b46a..30734ce68899 100644 --- a/cppunit/makefile.mk +++ b/cppunit/makefile.mk @@ -34,7 +34,7 @@ TARFILE_MD5=bd30e9cf5523cdfc019b94f5e1d7fd19 # from -PATCH_FILES = solarisfinite.patch warnings.patch windows.patch ldflags.patch aix.patch avoid-synthetised-destructor.patch ios.patch cppunit-1.12.1-unused-parameters.patch +PATCH_FILES = solarisfinite.patch warnings.patch windows.patch ldflags.patch aix.patch avoid-synthetised-destructor.patch ios.patch cppunit-1.12.1-unused-parameters.patch cppunit-1.12.1-warnings.patch # solarisfinite.patch: see ; upstreamed as # + # cppunit-1.12.1-warnings.patch: work around additional warnings (found when + # converting module unotest to gbuild) .IF "$(OS)" == "ANDROID" PATCH_FILES += android.patch -- cgit