[Libreoffice-commits] online.git: net/Socket.hpp wsd/Auth.hpp wsd/LOOLWSD.cpp wsd/Storage.hpp

Miklos Vajna vmiklos at collabora.co.uk
Tue Sep 12 08:03:51 UTC 2017


 net/Socket.hpp  |    1 +
 wsd/Auth.hpp    |    1 +
 wsd/LOOLWSD.cpp |    6 +++---
 wsd/Storage.hpp |    2 ++
 4 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit bcb5b744b8cc56ca7d8e82b2db23146823546902
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Sep 12 10:03:26 2017 +0200

    net, wsd: fix -Werror,-Wdelete-non-virtual-dtor warnings
    
    Two problem types:
    
    - non-final class has virtual functions but no virtual dtor -> mark the
      class final
    - abstract class has no virtual dtor -> add a virtual dtor
    
    Change-Id: Iae208b65c774e6da7a3dda5e725fe07d4d589e4f

diff --git a/net/Socket.hpp b/net/Socket.hpp
index f3cf623c..3442fdb1 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -659,6 +659,7 @@ class StreamSocket;
 class SocketHandlerInterface
 {
 public:
+    virtual ~SocketHandlerInterface() {}
     /// Called when the socket is newly created to
     /// set the socket associated with this ResponseClient.
     /// Will be called exactly once.
diff --git a/wsd/Auth.hpp b/wsd/Auth.hpp
index 98c0a2ce..96bcb86b 100644
--- a/wsd/Auth.hpp
+++ b/wsd/Auth.hpp
@@ -57,6 +57,7 @@ public:
 class AuthBase
 {
 public:
+    virtual ~AuthBase() {}
     /// Called to acquire an access token.
     virtual const std::string getAccessToken() = 0;
 
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index dc389dcf..c2a452c7 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2280,7 +2280,7 @@ private:
 
 std::map<std::string, std::string> ClientRequestDispatcher::StaticFileContentCache;
 
-class PlainSocketFactory : public SocketFactory
+class PlainSocketFactory final : public SocketFactory
 {
     std::shared_ptr<Socket> create(const int physicalFd) override
     {
@@ -2299,7 +2299,7 @@ class PlainSocketFactory : public SocketFactory
 };
 
 #if ENABLE_SSL
-class SslSocketFactory : public SocketFactory
+class SslSocketFactory final : public SocketFactory
 {
     std::shared_ptr<Socket> create(const int physicalFd) override
     {
@@ -2313,7 +2313,7 @@ class SslSocketFactory : public SocketFactory
 };
 #endif
 
-class PrisonerSocketFactory : public SocketFactory
+class PrisonerSocketFactory final : public SocketFactory
 {
     std::shared_ptr<Socket> create(const int fd) override
     {
diff --git a/wsd/Storage.hpp b/wsd/Storage.hpp
index 2c619581..389c228d 100644
--- a/wsd/Storage.hpp
+++ b/wsd/Storage.hpp
@@ -83,6 +83,8 @@ public:
         LOG_DBG("Storage ctor: " << uri.toString());
     }
 
+    virtual ~StorageBase() {}
+
     const std::string getUri() const { return _uri.toString(); }
 
     /// Returns the root path to the jailed file.


More information about the Libreoffice-commits mailing list