summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-06-09 19:00:55 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-06-09 19:19:59 (GMT)
commit644051bad4ce7b088ea8af07c9b82a5920c96f4b (patch)
tree5c18f3cee950a7e9a683e6cbb666ec0ea128ee0e /Swiften
parentb3b77f1d4a85a9a933b1a913a90b57a0e2db42a3 (diff)
downloadswift-contrib-644051bad4ce7b088ea8af07c9b82a5920c96f4b.zip
swift-contrib-644051bad4ce7b088ea8af07c9b82a5920c96f4b.tar.bz2
Enabled & fixed some more C++ warnings.
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Compress/ZLibCompressor.cpp19
-rw-r--r--Swiften/Compress/ZLibCompressor.h11
-rw-r--r--Swiften/Compress/ZLibDecompressor.cpp19
-rw-r--r--Swiften/Compress/ZLibDecompressor.h11
-rw-r--r--Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h2
-rw-r--r--Swiften/Network/PlatformDomainNameServiceQuery.cpp2
-rw-r--r--Swiften/SConscript2
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.cpp2
-rw-r--r--Swiften/StringCodecs/MD5.cpp2
9 files changed, 51 insertions, 19 deletions
diff --git a/Swiften/Compress/ZLibCompressor.cpp b/Swiften/Compress/ZLibCompressor.cpp
new file mode 100644
index 0000000..7e3116e
--- /dev/null
+++ b/Swiften/Compress/ZLibCompressor.cpp
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2010 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#include "Swiften/Compress/ZLibCompressor.h"
+
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+
+namespace Swift {
+
+ZLibCompressor::ZLibCompressor() {
+ int result = deflateInit(&stream_, COMPRESSION_LEVEL);
+ assert(result == Z_OK);
+ (void) result;
+}
+
+}
diff --git a/Swiften/Compress/ZLibCompressor.h b/Swiften/Compress/ZLibCompressor.h
index d1d835b..7fe5387 100644
--- a/Swiften/Compress/ZLibCompressor.h
+++ b/Swiften/Compress/ZLibCompressor.h
@@ -4,8 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#ifndef SWIFTEN_ZLibCompressor_H
-#define SWIFTEN_ZLibCompressor_H
+#pragma once
#include <cassert>
@@ -15,11 +14,7 @@
namespace Swift {
class ZLibCompressor : public ZLibCodecompressor {
public:
- ZLibCompressor() {
- int result = deflateInit(&stream_, COMPRESSION_LEVEL);
- assert(result == Z_OK);
- (void) result;
- }
+ ZLibCompressor();
~ZLibCompressor() {
deflateEnd(&stream_);
@@ -33,5 +28,3 @@ namespace Swift {
static const int COMPRESSION_LEVEL = 9;
};
}
-
-#endif
diff --git a/Swiften/Compress/ZLibDecompressor.cpp b/Swiften/Compress/ZLibDecompressor.cpp
new file mode 100644
index 0000000..af7349b
--- /dev/null
+++ b/Swiften/Compress/ZLibDecompressor.cpp
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2010 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#include "Swiften/Compress/ZLibDecompressor.h"
+
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+
+namespace Swift {
+
+ZLibDecompressor::ZLibDecompressor() {
+ int result = inflateInit(&stream_);
+ assert(result == Z_OK);
+ (void) result;
+}
+
+}
diff --git a/Swiften/Compress/ZLibDecompressor.h b/Swiften/Compress/ZLibDecompressor.h
index ce8573e..ec08a4f 100644
--- a/Swiften/Compress/ZLibDecompressor.h
+++ b/Swiften/Compress/ZLibDecompressor.h
@@ -4,8 +4,7 @@
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#ifndef SWIFTEN_ZLibDecompressor_H
-#define SWIFTEN_ZLibDecompressor_H
+#pragma once
#include <cassert>
@@ -15,11 +14,7 @@
namespace Swift {
class ZLibDecompressor : public ZLibCodecompressor {
public:
- ZLibDecompressor() {
- int result = inflateInit(&stream_);
- assert(result == Z_OK);
- (void) result;
- }
+ ZLibDecompressor();
~ZLibDecompressor() {
inflateEnd(&stream_);
@@ -30,5 +25,3 @@ namespace Swift {
}
};
}
-
-#endif
diff --git a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h
index cea22d4..de52321 100644
--- a/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Bonjour/BonjourResolveHostnameQuery.h
@@ -6,6 +6,8 @@
#pragma once
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+
#include "Swiften/Base/String.h"
#include "Swiften/LinkLocal/DNSSD/Bonjour/BonjourQuery.h"
#include "Swiften/LinkLocal/DNSSD/DNSSDResolveHostnameQuery.h"
diff --git a/Swiften/Network/PlatformDomainNameServiceQuery.cpp b/Swiften/Network/PlatformDomainNameServiceQuery.cpp
index 3ee0b18..aa0be4e 100644
--- a/Swiften/Network/PlatformDomainNameServiceQuery.cpp
+++ b/Swiften/Network/PlatformDomainNameServiceQuery.cpp
@@ -6,6 +6,8 @@
#include "Swiften/Network/PlatformDomainNameServiceQuery.h"
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+
#include "Swiften/Base/Platform.h"
#include <stdlib.h>
#ifdef SWIFTEN_PLATFORM_WINDOWS
diff --git a/Swiften/SConscript b/Swiften/SConscript
index 2d5490c..33a1a7e 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -33,6 +33,8 @@ if env["SCONS_STAGE"] == "build" :
"Client/Client.cpp",
"Client/ClientSession.cpp",
"Compress/ZLibCodecompressor.cpp",
+ "Compress/ZLibDecompressor.cpp",
+ "Compress/ZLibCompressor.cpp",
"Disco/CapsInfoGenerator.cpp",
"Elements/DiscoInfo.cpp",
"Elements/Element.cpp",
diff --git a/Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.cpp
index 36aa47f..4586a74 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.cpp
@@ -13,7 +13,7 @@ namespace Swift {
MUCPayloadSerializer::MUCPayloadSerializer() : GenericPayloadSerializer<MUCPayload>() {
}
-String MUCPayloadSerializer::serializePayload(boost::shared_ptr<MUCPayload> payload) const {
+String MUCPayloadSerializer::serializePayload(boost::shared_ptr<MUCPayload>) const {
XMLElement mucElement("x", "http://jabber.org/protocol/muc");
return mucElement.serialize();
}
diff --git a/Swiften/StringCodecs/MD5.cpp b/Swiften/StringCodecs/MD5.cpp
index 09c3a42..718f52e 100644
--- a/Swiften/StringCodecs/MD5.cpp
+++ b/Swiften/StringCodecs/MD5.cpp
@@ -31,6 +31,8 @@
ghost@aladdin.com
*/
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+
#include "Swiften/StringCodecs/MD5.h"
#include <cassert>