From bf1f0183d5c6b4c94acdbee27276d5a386a657f4 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 18 Oct 2011 23:05:58 +0200 Subject: Some fixes for "clang version 3.1 (trunk 142234)" (with --enable-werror, on Linux x86_64). --- cppu/qa/cppumaker/test_cppumaker.cxx | 44 ++++++++++++++++++++---------------- cppu/qa/test_unotype.cxx | 2 ++ 2 files changed, 27 insertions(+), 19 deletions(-) (limited to 'cppu/qa') diff --git a/cppu/qa/cppumaker/test_cppumaker.cxx b/cppu/qa/cppumaker/test_cppumaker.cxx index 141c3e2fd1d7..11435e544b9a 100644 --- a/cppu/qa/cppumaker/test_cppumaker.cxx +++ b/cppu/qa/cppumaker/test_cppumaker.cxx @@ -380,6 +380,7 @@ //TODO, copied here from test/oustringostreaminserter.hxx, make DRY again: #include "osl/thread.h" +namespace rtl { template< typename charT, typename traits > std::basic_ostream & operator <<( std::basic_ostream & stream, rtl::OUString const & string) @@ -389,6 +390,30 @@ operator <<( // best effort; potentially loses data due to conversion failures and // embedded null characters } +} + +namespace com { namespace sun { namespace star { namespace uno { + +std::ostream & operator <<( + std::ostream & out, com::sun::star::uno::Exception const &) +{ + return out << ""; +} + +} } } } + +namespace test { namespace codemaker { namespace cppumaker { + +bool operator ==( + test::codemaker::cppumaker::TestException1 const & e1, + test::codemaker::cppumaker::TestException1 const & e2) +{ + return e1.Message == e2.Message && e1.Context == e2.Context + && e1.m1 == e2.m1 && e1.m2 == e2.m2 && e1.m3 == e2.m3 + && e1.m4.member1 == e2.m4.member1 && e1.m4.member2 == e2.m4.member2; +} + +} } } namespace { @@ -503,25 +528,6 @@ void Test::testPolyStruct() { static_cast< sal_uInt32 >(5)); } -namespace { - -bool operator ==( - test::codemaker::cppumaker::TestException1 const & e1, - test::codemaker::cppumaker::TestException1 const & e2) -{ - return e1.Message == e2.Message && e1.Context == e2.Context - && e1.m1 == e2.m1 && e1.m2 == e2.m2 && e1.m3 == e2.m3 - && e1.m4.member1 == e2.m4.member1 && e1.m4.member2 == e2.m4.member2; -} - -std::ostream & operator <<( - std::ostream & out, com::sun::star::uno::Exception const &) -{ - return out << ""; -} - -} - void Test::testExceptions() { ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > > aEmptySequence; diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx index 110ae204095c..dbb13d6b1d1f 100644 --- a/cppu/qa/test_unotype.cxx +++ b/cppu/qa/test_unotype.cxx @@ -61,6 +61,7 @@ //TODO, copied here from test/oustringostreaminserter.hxx, make DRY again: #include "osl/thread.h" +namespace rtl { template< typename charT, typename traits > std::basic_ostream & operator <<( std::basic_ostream & stream, rtl::OUString const & string) @@ -70,6 +71,7 @@ operator <<( // best effort; potentially loses data due to conversion failures and // embedded null characters } +} namespace com { namespace sun { namespace star { namespace uno { class Any; -- cgit