summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-12-30 16:47:37 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-12-30 18:03:54 (GMT)
commit96b31c598f5c229c3acc0579ddfe22dd503e2b9d (patch)
treed73db22e591e49f088f359b9876df232eb99c6a9 /Swiften/Serializer
parentb19210aa48e7cea40929593daed997668fe789be (diff)
downloadswift-contrib-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.zip
swift-contrib-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.tar.bz2
Enable & fix pedantic CLang warnings.
Change-Id: I70109624b4bd7aab9ba679a3eaabc225dd64a03a
Diffstat (limited to 'Swiften/Serializer')
-rw-r--r--Swiften/Serializer/PayloadSerializers/ChatStateSerializer.cpp1
-rw-r--r--Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/IBBSerializer.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCItemSerializer.h2
4 files changed, 4 insertions, 5 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/ChatStateSerializer.cpp b/Swiften/Serializer/PayloadSerializers/ChatStateSerializer.cpp
index ee468bb..d23cad7 100644
--- a/Swiften/Serializer/PayloadSerializers/ChatStateSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/ChatStateSerializer.cpp
@@ -19,7 +19,6 @@ std::string ChatStateSerializer::serializePayload(boost::shared_ptr<ChatState> c
case ChatState::Paused: result += "paused"; break;
case ChatState::Inactive: result += "inactive"; break;
case ChatState::Gone: result += "gone"; break;
- default: result += "gone"; break;
}
result += " xmlns=\"http://jabber.org/protocol/chatstates\"/>";
return result;
diff --git a/Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp b/Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp
index fa6a566..954b885 100644
--- a/Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp
@@ -20,7 +20,7 @@ std::string ErrorSerializer::serializePayload(boost::shared_ptr<ErrorPayload> er
case ErrorPayload::Modify: result += "modify"; break;
case ErrorPayload::Auth: result += "auth"; break;
case ErrorPayload::Wait: result += "wait"; break;
- default: result += "cancel"; break;
+ case ErrorPayload::Cancel: result += "cancel"; break;
}
result += "\">";
@@ -47,7 +47,7 @@ std::string ErrorSerializer::serializePayload(boost::shared_ptr<ErrorPayload> er
case ErrorPayload::ServiceUnavailable: conditionElement = "service-unavailable"; break;
case ErrorPayload::SubscriptionRequired: conditionElement = "subscription-required"; break;
case ErrorPayload::UnexpectedRequest: conditionElement = "unexpected-request"; break;
- default: conditionElement = "undefined-condition"; break;
+ case ErrorPayload::UndefinedCondition: conditionElement = "undefined-condition"; break;
}
result += "<" + conditionElement + " xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\"/>";
diff --git a/Swiften/Serializer/PayloadSerializers/IBBSerializer.cpp b/Swiften/Serializer/PayloadSerializers/IBBSerializer.cpp
index e78cdb4..c83b293 100644
--- a/Swiften/Serializer/PayloadSerializers/IBBSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/IBBSerializer.cpp
@@ -8,6 +8,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/smart_ptr/make_shared.hpp>
+#include <cassert>
#include <boost/lexical_cast.hpp>
#include <Swiften/Base/foreach.h>
@@ -48,6 +49,7 @@ std::string IBBSerializer::serializePayload(boost::shared_ptr<IBB> ibb) const {
return ibbElement.serialize();
}
}
+ assert(false);
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/MUCItemSerializer.h b/Swiften/Serializer/PayloadSerializers/MUCItemSerializer.h
index 2b5ffcc..2f2623f 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCItemSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MUCItemSerializer.h
@@ -23,7 +23,6 @@ namespace Swift {
case MUCOccupant::Member: result = "member"; break;
case MUCOccupant::Outcast: result = "outcast"; break;
case MUCOccupant::NoAffiliation: result = "none"; break;
- default: assert(false);
}
return result;
}
@@ -35,7 +34,6 @@ namespace Swift {
case MUCOccupant::NoRole: result = "none"; break;
case MUCOccupant::Participant: result = "participant"; break;
case MUCOccupant::Visitor: result = "visitor"; break;
- default: assert(false);
}
return result;