From 49e92fe3288bbc7cab365d9db1b9c0b0bde84afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Tue, 26 Oct 2010 21:48:49 +0200 Subject: Fix compliation problems with CLang. diff --git a/SwifTools/Idle/IdleQuerierTest/SConscript b/SwifTools/Idle/IdleQuerierTest/SConscript index c7dbd2c..65f94ba 100644 --- a/SwifTools/Idle/IdleQuerierTest/SConscript +++ b/SwifTools/Idle/IdleQuerierTest/SConscript @@ -7,4 +7,5 @@ if env["TEST"] : myenv.MergeFlags(myenv["BOOST_FLAGS"]) if myenv["HAVE_XSS"] : myenv.MergeFlags(myenv.get("XSS_FLAGS", {})) + myenv.MergeFlags(myenv["PLATFORM_FLAGS"]) tester = myenv.Program("IdleQuerierTest", ["IdleQuerierTest.cpp"]) diff --git a/SwifTools/Notifier/GrowlNotifier.cpp b/SwifTools/Notifier/GrowlNotifier.cpp index 3eb580a..785216b 100644 --- a/SwifTools/Notifier/GrowlNotifier.cpp +++ b/SwifTools/Notifier/GrowlNotifier.cpp @@ -13,6 +13,7 @@ #include "Swiften/Base/foreach.h" #pragma GCC diagnostic ignored "-Wold-style-cast" +#pragma GCC diagnostics ignored "-Wdeprecated-declarations" namespace { struct Context { diff --git a/Swiften/Avatars/UnitTest/VCardAvatarManagerTest.cpp b/Swiften/Avatars/UnitTest/VCardAvatarManagerTest.cpp index 8a0658c..8cb9ccb 100644 --- a/Swiften/Avatars/UnitTest/VCardAvatarManagerTest.cpp +++ b/Swiften/Avatars/UnitTest/VCardAvatarManagerTest.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include #include diff --git a/Swiften/Avatars/UnitTest/VCardUpdateAvatarManagerTest.cpp b/Swiften/Avatars/UnitTest/VCardUpdateAvatarManagerTest.cpp index 054853d..a928ced 100644 --- a/Swiften/Avatars/UnitTest/VCardUpdateAvatarManagerTest.cpp +++ b/Swiften/Avatars/UnitTest/VCardUpdateAvatarManagerTest.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include #include diff --git a/Swiften/Compress/UnitTest/ZLibCompressorTest.cpp b/Swiften/Compress/UnitTest/ZLibCompressorTest.cpp index c05a0a3..0b2fa5a 100644 --- a/Swiften/Compress/UnitTest/ZLibCompressorTest.cpp +++ b/Swiften/Compress/UnitTest/ZLibCompressorTest.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include diff --git a/Swiften/Compress/UnitTest/ZLibDecompressorTest.cpp b/Swiften/Compress/UnitTest/ZLibDecompressorTest.cpp index 4513cbc..3ee5c4f 100644 --- a/Swiften/Compress/UnitTest/ZLibDecompressorTest.cpp +++ b/Swiften/Compress/UnitTest/ZLibDecompressorTest.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include diff --git a/Swiften/Elements/VCard.h b/Swiften/Elements/VCard.h index e1f6f88..5e26003 100644 --- a/Swiften/Elements/VCard.h +++ b/Swiften/Elements/VCard.h @@ -70,7 +70,7 @@ namespace Swift { unknownContent_ += c; } - const std::vector getEMailAddresses() const { + const std::vector& getEMailAddresses() const { return emailAddresses_; } diff --git a/Swiften/EventLoop/Event.h b/Swiften/EventLoop/Event.h index 9f9fc9b..209de33 100644 --- a/Swiften/EventLoop/Event.h +++ b/Swiften/EventLoop/Event.h @@ -12,17 +12,18 @@ #include "Swiften/EventLoop/EventOwner.h" namespace Swift { - struct Event { - Event(boost::shared_ptr owner, const boost::function& callback) : - owner(owner), callback(callback) { - } + class Event { + public: + Event(boost::shared_ptr owner, const boost::function& callback) : + owner(owner), callback(callback) { + } - bool operator==(const Event& o) const { - return o.id == id; - } + bool operator==(const Event& o) const { + return o.id == id; + } - unsigned int id; - boost::shared_ptr owner; - boost::function callback; + unsigned int id; + boost::shared_ptr owner; + boost::function callback; }; } diff --git a/Swiften/FileTransfer/UnitTest/IBBSendSessionTest.cpp b/Swiften/FileTransfer/UnitTest/IBBSendSessionTest.cpp index 9052439..afd71c0 100644 --- a/Swiften/FileTransfer/UnitTest/IBBSendSessionTest.cpp +++ b/Swiften/FileTransfer/UnitTest/IBBSendSessionTest.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include #include diff --git a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamServerSessionTest.cpp b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamServerSessionTest.cpp index 126f971..574b35b 100644 --- a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamServerSessionTest.cpp +++ b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamServerSessionTest.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include #include diff --git a/Swiften/LinkLocal/UnitTest/LinkLocalServiceInfoTest.cpp b/Swiften/LinkLocal/UnitTest/LinkLocalServiceInfoTest.cpp index 8fb25fc..1e0ee8a 100644 --- a/Swiften/LinkLocal/UnitTest/LinkLocalServiceInfoTest.cpp +++ b/Swiften/LinkLocal/UnitTest/LinkLocalServiceInfoTest.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include diff --git a/Swiften/Parser/PayloadParsers/UnitTest/IBBParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/IBBParserTest.cpp index f892deb..b4229f2 100644 --- a/Swiften/Parser/PayloadParsers/UnitTest/IBBParserTest.cpp +++ b/Swiften/Parser/PayloadParsers/UnitTest/IBBParserTest.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include diff --git a/Swiften/Parser/PayloadParsers/UnitTest/VCardParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/VCardParserTest.cpp index dfcc0ec..aed04bc 100644 --- a/Swiften/Parser/PayloadParsers/UnitTest/VCardParserTest.cpp +++ b/Swiften/Parser/PayloadParsers/UnitTest/VCardParserTest.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include diff --git a/Swiften/QA/StorageTest/SConscript b/Swiften/QA/StorageTest/SConscript index 4d0a197..6d65b30 100644 --- a/Swiften/QA/StorageTest/SConscript +++ b/Swiften/QA/StorageTest/SConscript @@ -12,6 +12,7 @@ if env["TEST"] : myenv.MergeFlags(myenv["LIBIDN_FLAGS"]) myenv.MergeFlags(myenv.get("EXPAT_FLAGS", {})) myenv.MergeFlags(myenv.get("LIBXML_FLAGS", {})) + myenv.MergeFlags(myenv["PLATFORM_FLAGS"]) tester = myenv.Program("StorageTest", [ "VCardFileStorageTest.cpp", diff --git a/Swiften/SASL/UnitTest/PLAINClientAuthenticatorTest.cpp b/Swiften/SASL/UnitTest/PLAINClientAuthenticatorTest.cpp index 7784898..33914b2 100644 --- a/Swiften/SASL/UnitTest/PLAINClientAuthenticatorTest.cpp +++ b/Swiften/SASL/UnitTest/PLAINClientAuthenticatorTest.cpp @@ -4,11 +4,11 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/SASL/PLAINClientAuthenticator.h" + #include #include -#include "Swiften/SASL/PLAINClientAuthenticator.h" - using namespace Swift; class PLAINClientAuthenticatorTest : public CppUnit::TestFixture { diff --git a/Swiften/SASL/UnitTest/PLAINMessageTest.cpp b/Swiften/SASL/UnitTest/PLAINMessageTest.cpp index 6659ee4..142d09e 100644 --- a/Swiften/SASL/UnitTest/PLAINMessageTest.cpp +++ b/Swiften/SASL/UnitTest/PLAINMessageTest.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include diff --git a/Swiften/StreamStack/UnitTest/StreamStackTest.cpp b/Swiften/StreamStack/UnitTest/StreamStackTest.cpp index 0ea0835..8949315 100644 --- a/Swiften/StreamStack/UnitTest/StreamStackTest.cpp +++ b/Swiften/StreamStack/UnitTest/StreamStackTest.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include #include diff --git a/Swiften/StringCodecs/UnitTest/Base64Test.cpp b/Swiften/StringCodecs/UnitTest/Base64Test.cpp index 70acc88..2f6f0a0 100644 --- a/Swiften/StringCodecs/UnitTest/Base64Test.cpp +++ b/Swiften/StringCodecs/UnitTest/Base64Test.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include diff --git a/Swiften/StringCodecs/UnitTest/HMACSHA1Test.cpp b/Swiften/StringCodecs/UnitTest/HMACSHA1Test.cpp index efa12e0..44bd5b7 100644 --- a/Swiften/StringCodecs/UnitTest/HMACSHA1Test.cpp +++ b/Swiften/StringCodecs/UnitTest/HMACSHA1Test.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include diff --git a/Swiften/StringCodecs/UnitTest/MD5Test.cpp b/Swiften/StringCodecs/UnitTest/MD5Test.cpp index 337e09a..b76af48 100644 --- a/Swiften/StringCodecs/UnitTest/MD5Test.cpp +++ b/Swiften/StringCodecs/UnitTest/MD5Test.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include diff --git a/Swiften/StringCodecs/UnitTest/PBKDF2Test.cpp b/Swiften/StringCodecs/UnitTest/PBKDF2Test.cpp index a355117..092fe31 100644 --- a/Swiften/StringCodecs/UnitTest/PBKDF2Test.cpp +++ b/Swiften/StringCodecs/UnitTest/PBKDF2Test.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include diff --git a/Swiften/StringCodecs/UnitTest/SHA1Test.cpp b/Swiften/StringCodecs/UnitTest/SHA1Test.cpp index 545bc75a..9434235 100644 --- a/Swiften/StringCodecs/UnitTest/SHA1Test.cpp +++ b/Swiften/StringCodecs/UnitTest/SHA1Test.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include diff --git a/Swiften/VCards/UnitTest/VCardManagerTest.cpp b/Swiften/VCards/UnitTest/VCardManagerTest.cpp index 927bcfe..56bbfa1 100644 --- a/Swiften/VCards/UnitTest/VCardManagerTest.cpp +++ b/Swiften/VCards/UnitTest/VCardManagerTest.cpp @@ -4,6 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +#include "Swiften/Base/ByteArray.h" + #include #include #include -- cgit v0.10.2-6-g49f6