Allow compiler warnings for libpurple, glib, and xml2; add missing overrides in purplexpcom. r=florian default tip
authoraleth <aleth@instantbird.org>
Tue, 07 Mar 2017 23:12:25 +0100
changeset 793 276b573aefd741005ddf946d79c66156d160e729
parent 792 1db1403c8d5fb2e8a4b95fd37f75253d08581792
push id68
push useraleth@instantbird.org
push dateTue, 07 Mar 2017 22:12:32 +0000
reviewersflorian
Allow compiler warnings for libpurple, glib, and xml2; add missing overrides in purplexpcom. r=florian
libpurple/moz.build
libpurple/protocols/prpl.py
libraries/glib/moz.build
libraries/xml2/moz.build
moz.build
purplexpcom/src/purpleConvChat.h
purplexpcom/src/purpleConvIM.h
purplexpcom/src/purpleSockets.h
--- a/libpurple/moz.build
+++ b/libpurple/moz.build
@@ -139,10 +139,12 @@ if CONFIG['OS_ARCH'] == 'WINNT':
         'win32/wpurpleerror.h',
     ]
 
 
 JS_PREFERENCE_FILES += [
     'purple-prefs.js',
 ]
 
+ALLOW_COMPILER_WARNINGS = True
+
 Library('purple')
 FINAL_LIBRARY = 'purplexpcom'
--- a/libpurple/protocols/prpl.py
+++ b/libpurple/protocols/prpl.py
@@ -1,12 +1,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+ALLOW_COMPILER_WARNINGS = True
+
 if protocol in CONFIG['STATIC_PRPLS'].split(" "):
     Library(protocol)
     FINAL_LIBRARY = 'purplexpcom'
 else:
     SOURCES += ['!xpcomModule.cpp']
     XPCOMBinaryComponent(protocol)
 
     OS_LIBS += [
--- a/libraries/glib/moz.build
+++ b/libraries/glib/moz.build
@@ -178,10 +178,12 @@ if CONFIG['OS_ARCH'] == 'WINNT':
     OS_LIBS += [
         'shell32',
         'ws2_32',
         'ole32',
     ]
 else:
     OS_LIBS += CONFIG['ICONV_LIBS']
 
+ALLOW_COMPILER_WARNINGS = True
+
 Library('glib')
 FINAL_LIBRARY = 'purplexpcom'
--- a/libraries/xml2/moz.build
+++ b/libraries/xml2/moz.build
@@ -60,10 +60,12 @@ EXPORTS.libxml += [
     'xmlmemory.h',
     'xmlregexp.h',
     'xmlstring.h',
     'xmlversion.h',
     'xpath.h',
     'xpathInternals.h',
 ]
 
+ALLOW_COMPILER_WARNINGS = True
+
 Library('xml2')
 FINAL_LIBRARY = 'purplexpcom'
--- a/moz.build
+++ b/moz.build
@@ -11,12 +11,9 @@ if CONFIG['OS_ARCH'] in ('WINNT', 'Darwi
 
 DIRS += [
     'libpurple',
     'purplexpcom/public',
     'purplexpcom/src',
     'locales'
 ]
 
-# Let's be generous with third-party code...
-ALLOW_COMPILER_WARNINGS = True
-
 JAR_MANIFESTS += ['jar.mn']
--- a/purplexpcom/src/purpleConvChat.h
+++ b/purplexpcom/src/purpleConvChat.h
@@ -16,65 +16,65 @@
 #define PURPLE_CONV_CHAT_CONTRACTID     "@instantbird.org/purple/convchat;1"
 
 class purpleConvChat final : public prplIConvChat, public purpleConversation
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_PRPLICONVCHAT
 
-  NS_IMETHOD GetIsChat(bool *aIsChat);
-  NS_IMETHOD GetNormalizedName(nsACString& aNormalizedName);
+  NS_IMETHOD GetIsChat(bool *aIsChat) override;
+  NS_IMETHOD GetNormalizedName(nsACString& aNormalizedName) override;
 
   // Forward most methods to purpleConversation
-  NS_IMETHOD GetAccount(imIAccount * *aAccount) {
+  NS_IMETHOD GetAccount(imIAccount * *aAccount) override {
     return purpleConversation::GetAccount(aAccount);
   }
-  NS_IMETHOD GetName(nsACString & aName) {
+  NS_IMETHOD GetName(nsACString & aName) override {
     return purpleConversation::GetName(aName);
   }
-  NS_IMETHOD GetTitle(nsACString & aTitle) {
+  NS_IMETHOD GetTitle(nsACString & aTitle) override {
     return purpleConversation::GetTitle(aTitle);
   }
-  NS_IMETHOD GetStartDate(PRTime *aStartDate) {
+  NS_IMETHOD GetStartDate(PRTime *aStartDate) override {
     return purpleConversation::GetStartDate(aStartDate);
   }
-  NS_IMETHOD GetId(PRUint32 *aId) {
+  NS_IMETHOD GetId(PRUint32 *aId) override {
     return purpleConversation::GetId(aId);
   }
-  NS_IMETHOD SetId(PRUint32 aId) {
+  NS_IMETHOD SetId(PRUint32 aId) override {
     return purpleConversation::SetId(aId);
   }
 
-  NS_IMETHODIMP SendTyping(const nsACString & aString, int32_t *_retval) {
+  NS_IMETHODIMP SendTyping(const nsACString & aString, int32_t *_retval) override {
     return purpleConversation::SendTyping(aString, _retval);
   }
 
-  NS_IMETHOD UnInit(void) {
+  NS_IMETHOD UnInit(void) override {
     return purpleConversation::UnInit();
   }
-  NS_IMETHOD Close(void) {
+  NS_IMETHOD Close(void) override {
     return purpleConversation::Close();
   }
-  NS_IMETHOD AddObserver(nsIObserver *aObserver) {
+  NS_IMETHOD AddObserver(nsIObserver *aObserver) override {
     return purpleConversation::AddObserver(aObserver);
   }
-  NS_IMETHOD RemoveObserver(nsIObserver *aObserver) {
+  NS_IMETHOD RemoveObserver(nsIObserver *aObserver) override {
     return purpleConversation::RemoveObserver(aObserver);
   }
   NS_IMETHOD PrepareForSending(imIOutgoingMessage *aMsg, uint32_t *aMsgCount,
-                               char16_t * **aMsgs) {
+                               char16_t * **aMsgs) override {
     return purpleConversation::PrepareForSending(aMsg, aMsgCount, aMsgs);
   }
-  NS_IMETHOD PrepareForDisplaying(imIMessage *aMsg) {
+  NS_IMETHOD PrepareForDisplaying(imIMessage *aMsg) override {
     return purpleConversation::PrepareForDisplaying(aMsg);
   }
 
   // Keep the SendMsg method here
-  NS_IMETHOD SendMsg(const nsACString & aMsg);
+  NS_IMETHOD SendMsg(const nsACString & aMsg) override;
 
   purpleConvChat();
 
 private:
   ~purpleConvChat();
 
 protected:
 };
--- a/purplexpcom/src/purpleConvIM.h
+++ b/purplexpcom/src/purpleConvIM.h
@@ -16,61 +16,61 @@
 #define PURPLE_CONV_IM_CONTRACTID     "@instantbird.org/purple/convim;1"
 
 class purpleConvIM final : public prplIConvIM, public purpleConversation
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_PRPLICONVIM
 
-  NS_IMETHOD GetIsChat(bool *aIsChat);
-  NS_IMETHOD GetNormalizedName(nsACString& aNormalizedName);
+  NS_IMETHOD GetIsChat(bool *aIsChat) override;
+  NS_IMETHOD GetNormalizedName(nsACString& aNormalizedName) override;
 
   // Forward most methods to purpleConversation
-  NS_IMETHOD GetAccount(imIAccount * *aAccount) {
+  NS_IMETHOD GetAccount(imIAccount * *aAccount) override {
     return purpleConversation::GetAccount(aAccount);
   }
-  NS_IMETHOD GetName(nsACString & aName) {
+  NS_IMETHOD GetName(nsACString & aName) override {
     return purpleConversation::GetName(aName);
   }
-  NS_IMETHOD GetTitle(nsACString & aTitle) {
+  NS_IMETHOD GetTitle(nsACString & aTitle) override {
     return purpleConversation::GetTitle(aTitle);
   }
-  NS_IMETHOD GetStartDate(PRTime *aStartDate) {
+  NS_IMETHOD GetStartDate(PRTime *aStartDate) override {
     return purpleConversation::GetStartDate(aStartDate);
   }
-  NS_IMETHOD GetId(PRUint32 *aId) {
+  NS_IMETHOD GetId(PRUint32 *aId) override {
     return purpleConversation::GetId(aId);
   }
-  NS_IMETHOD SetId(PRUint32 aId) {
+  NS_IMETHOD SetId(PRUint32 aId) override {
     return purpleConversation::SetId(aId);
   }
-  NS_IMETHOD UnInit(void) {
+  NS_IMETHOD UnInit(void) override {
     return purpleConversation::UnInit();
   }
-  NS_IMETHOD Close(void) {
+  NS_IMETHOD Close(void) override {
     return purpleConversation::Close();
   }
-  NS_IMETHOD AddObserver(nsIObserver *aObserver) {
+  NS_IMETHOD AddObserver(nsIObserver *aObserver) override {
     return purpleConversation::AddObserver(aObserver);
   }
-  NS_IMETHOD RemoveObserver(nsIObserver *aObserver) {
+  NS_IMETHOD RemoveObserver(nsIObserver *aObserver) override {
     return purpleConversation::RemoveObserver(aObserver);
   }
   NS_IMETHOD PrepareForSending(imIOutgoingMessage *aMsg, uint32_t *aMsgCount,
-                               char16_t * **aMsgs) {
+                               char16_t * **aMsgs) override {
     return purpleConversation::PrepareForSending(aMsg, aMsgCount, aMsgs);
   }
-  NS_IMETHOD PrepareForDisplaying(imIMessage *aMsg) {
+  NS_IMETHOD PrepareForDisplaying(imIMessage *aMsg) override {
     return purpleConversation::PrepareForDisplaying(aMsg);
   }
 
   // Keep the SendMsg and SendTyping methods here.
-  NS_IMETHOD SendMsg(const nsACString & aMsg);
-  NS_IMETHODIMP SendTyping(const nsACString & aString, int32_t *_retval);
+  NS_IMETHOD SendMsg(const nsACString & aMsg) override;
+  NS_IMETHODIMP SendTyping(const nsACString & aString, int32_t *_retval) override;
 
   purpleConvIM();
 
 private:
   ~purpleConvIM();
 
 protected:
   bool mSentTyping;
--- a/purplexpcom/src/purpleSockets.h
+++ b/purplexpcom/src/purpleSockets.h
@@ -21,21 +21,21 @@ class nsIObserver;
 class purpleSocketInternal final : public nsASocketHandler,
   public nsIRunnable
 {
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIRUNNABLE
 
   nsresult Init(PRFileDesc *aFd, nsIRunnable *aRunnable, PRUint16 aPollFlags);
-  void OnSocketReady(PRFileDesc*, PRInt16);
-  void OnSocketDetached(PRFileDesc*);
-  void IsLocal(bool*);
-  uint64_t ByteCountSent() { return 0; }
-  uint64_t ByteCountReceived() { return 0; }
+  void OnSocketReady(PRFileDesc*, PRInt16) override;
+  void OnSocketDetached(PRFileDesc*) override;
+  void IsLocal(bool*) override;
+  uint64_t ByteCountSent() override { return 0; }
+  uint64_t ByteCountReceived() override { return 0; }
   nsresult PostEvent();
   nsresult Cancel();
   bool GetCanceled() { return mCanceled; }
   purpleSocketInternal(PRUint32 aId);
   PRUint32 mId;
 
  private:
   ~purpleSocketInternal();