From 522dfe5cd1390181ec8fb3f5fa3c8f665af3f806 Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Sat, 28 Apr 2018 13:06:12 +0100
Subject: Fix compiler warnings for Swiften

Test-Information:
./scons allow_warnings=0 Swiften now builds on latest macOS

Change-Id: Ic2095d5d112093d021f7f4695fbce73f315377cf

diff --git a/Swiften/Config/SConscript b/Swiften/Config/SConscript
index dd06d61..ae0d37a 100644
--- a/Swiften/Config/SConscript
+++ b/Swiften/Config/SConscript
@@ -10,7 +10,7 @@ def cStringVariable(env, cVar, sconsVar) :
     # FIXME: Probably not very robust
     for var in sconsVar.split(" ") :
         result += "\t\"" + env.subst(var).replace("\\", "\\\\") + "\",\n"
-    result += "\t0\n"
+    result += "\tnullptr\n"
     result += "};\n"
     return result
 
@@ -22,15 +22,15 @@ swiften_env.UseFlags(swiften_env["SWIFTEN_DEP_FLAGS"])
 
 cppflags = replaceSwiftenPath(" ".join([
     swiften_env.subst("$CPPFLAGS").replace("-isystem ","-I"),
-    swiften_env.subst("$_CPPDEFFLAGS"), 
+    swiften_env.subst("$_CPPDEFFLAGS"),
     swiften_env.subst("$_CPPINCFLAGS")]))
 config_flags += cStringVariable(swiften_env, "CPPFLAGS", cppflags)
 
 libflags = replaceSwiftenPath(" ".join([
-        swiften_env.subst("$_LIBDIRFLAGS"), 
-        swiften_env.subst("$_LIBFLAGS"), 
-        swiften_env.subst("$_FRAMEWORKPATH"), 
-        swiften_env.subst("$_FRAMEWORKS"), 
+        swiften_env.subst("$_LIBDIRFLAGS"),
+        swiften_env.subst("$_LIBFLAGS"),
+        swiften_env.subst("$_FRAMEWORKPATH"),
+        swiften_env.subst("$_FRAMEWORKS"),
         swiften_env.subst("$_FRAMEWORKSFLAGS")
     ]))
 config_flags += cStringVariable(swiften_env, "LIBFLAGS", libflags)
diff --git a/Swiften/MIX/MIXImpl.h b/Swiften/MIX/MIXImpl.h
index 58b33f4..4da7a62 100644
--- a/Swiften/MIX/MIXImpl.h
+++ b/Swiften/MIX/MIXImpl.h
@@ -1,4 +1,10 @@
 /*
+ * Copyright (c) 2018 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
+ /*
  * Copyright (c) 2017 Tarun Gupta
  * Licensed under the simplified BSD license.
  * See Documentation/Licenses/BSD-simplified.txt for more information.
@@ -18,7 +24,7 @@ namespace Swift {
 
         public:
             MIXImpl(const JID& ownJID, const JID& channelJID, IQRouter* iqRouter);
-            virtual ~MIXImpl();
+            virtual ~MIXImpl() override;
 
             /**
              * Returns the (bare) JID of the user.
diff --git a/Swiften/Parser/PayloadParsers/MIXUpdateSubscriptionParser.h b/Swiften/Parser/PayloadParsers/MIXUpdateSubscriptionParser.h
index 9975411..47966ff 100644
--- a/Swiften/Parser/PayloadParsers/MIXUpdateSubscriptionParser.h
+++ b/Swiften/Parser/PayloadParsers/MIXUpdateSubscriptionParser.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (c) 2017 Isode Limited.
+ * Copyright (c) 2017-2018 Isode Limited.
  * All rights reserved.
  * See the COPYING file for more information.
  */
@@ -24,7 +24,7 @@ namespace Swift {
     class SWIFTEN_API MIXUpdateSubscriptionParser : public GenericPayloadParser<MIXUpdateSubscription> {
         public:
             MIXUpdateSubscriptionParser();
-            virtual ~MIXUpdateSubscriptionParser();
+            virtual ~MIXUpdateSubscriptionParser() override;
 
             virtual void handleStartElement(const std::string& element, const std::string&, const AttributeMap& attributes) override;
             virtual void handleEndElement(const std::string& element, const std::string&) override;
diff --git a/Swiften/Serializer/PayloadSerializers/MIXUpdateSubscriptionSerializer.h b/Swiften/Serializer/PayloadSerializers/MIXUpdateSubscriptionSerializer.h
index ee59bf7..4ba9584 100644
--- a/Swiften/Serializer/PayloadSerializers/MIXUpdateSubscriptionSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MIXUpdateSubscriptionSerializer.h
@@ -5,7 +5,7 @@
  */
 
 /*
- * Copyright (c) 2017 Isode Limited.
+ * Copyright (c) 2017-2018 Isode Limited.
  * All rights reserved.
  * See the COPYING file for more information.
  */
@@ -23,7 +23,7 @@ namespace Swift {
     class SWIFTEN_API MIXUpdateSubscriptionSerializer : public GenericPayloadSerializer<MIXUpdateSubscription> {
         public:
             MIXUpdateSubscriptionSerializer();
-            virtual ~MIXUpdateSubscriptionSerializer();
+            virtual ~MIXUpdateSubscriptionSerializer() override;
 
             virtual std::string serializePayload(std::shared_ptr<MIXUpdateSubscription>) const override;
     };
-- 
cgit v0.10.2-6-g49f6