[Libreoffice-commits] online.git: 2 commits - gtk/Makefile.am net/ServerSocket.hpp net/WebSocketHandler.hpp

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Apr 19 09:14:16 UTC 2019


 gtk/Makefile.am          |    2 +-
 net/ServerSocket.hpp     |    4 ++++
 net/WebSocketHandler.hpp |   46 +++++++++++++++++++++++++++-------------------
 3 files changed, 32 insertions(+), 20 deletions(-)

New commits:
commit 556b2a57e7c2f09a3e2d30397641792c89d235db
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Apr 19 11:10:51 2019 +0200
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Apr 19 11:10:51 2019 +0200

    gtkapp: Fix clang's error: private field '...' is not used
    
    [-Werror,-Wunused-private-field] in the WaE mode.
    
    Change-Id: I38cce5326023939391b661d077bed4616c88c12b

diff --git a/net/ServerSocket.hpp b/net/ServerSocket.hpp
index a0d45b453..bdc6e13a0 100644
--- a/net/ServerSocket.hpp
+++ b/net/ServerSocket.hpp
@@ -29,7 +29,9 @@ class ServerSocket : public Socket
 public:
     ServerSocket(Socket::Type type, SocketPoll& clientPoller, std::shared_ptr<SocketFactory> sockFactory) :
         Socket(type),
+#if !MOBILEAPP
         _type(type),
+#endif
         _clientPoller(clientPoller),
         _sockFactory(std::move(sockFactory))
     {
@@ -90,7 +92,9 @@ public:
     }
 
 private:
+#if !MOBILEAPP
     Socket::Type _type;
+#endif
     SocketPoll& _clientPoller;
 protected:
     std::shared_ptr<SocketFactory> _sockFactory;
diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp
index 1b24ab93b..c943a5bd1 100644
--- a/net/WebSocketHandler.hpp
+++ b/net/WebSocketHandler.hpp
@@ -36,9 +36,11 @@ private:
     std::vector<char> _wsPayload;
     std::atomic<bool> _shuttingDown;
     bool _isClient;
+#if !MOBILEAPP
     bool _isMasking;
     bool _inFragmentBlock;
     bool _isManualDefrag;
+#endif
 
 protected:
     struct WSFrameMask
@@ -60,14 +62,16 @@ public:
     ///                 defragmentation should be handled inside message handler (true) or the message handler
     ///                 should be called after all fragments of a message were received and the message
     ///                 was defragmented (false).
-    WebSocketHandler(bool isClient = false, bool isMasking = true, bool isManualDefrag = false) :
-        _lastPingSentTime(std::chrono::steady_clock::now()),
-        _pingTimeUs(0),
-        _shuttingDown(false),
-        _isClient(isClient),
-        _isMasking(isClient && isMasking),
-        _inFragmentBlock(false),
-        _isManualDefrag(isManualDefrag)
+    WebSocketHandler(bool isClient = false, bool isMasking = true, bool isManualDefrag = false)
+        : _lastPingSentTime(std::chrono::steady_clock::now())
+        , _pingTimeUs(0)
+        , _shuttingDown(false)
+        , _isClient(isClient)
+#if !MOBILEAPP
+        , _isMasking(isClient && isMasking)
+        , _inFragmentBlock(false)
+        , _isManualDefrag(isManualDefrag)
+#endif
     {
     }
 
@@ -76,17 +80,19 @@ public:
     /// socket: the TCP socket which received the upgrade request
     /// request: the HTTP upgrade request to WebSocket
     WebSocketHandler(const std::weak_ptr<StreamSocket>& socket,
-                     const Poco::Net::HTTPRequest& request) :
-        _socket(socket),
-        _lastPingSentTime(std::chrono::steady_clock::now() -
-                  std::chrono::milliseconds(PingFrequencyMs) -
-                  std::chrono::milliseconds(InitialPingDelayMs)),
-        _pingTimeUs(0),
-        _shuttingDown(false),
-        _isClient(false),
-        _isMasking(false),
-        _inFragmentBlock(false),
-        _isManualDefrag(false)
+                     const Poco::Net::HTTPRequest& request)
+        : _socket(socket)
+        , _lastPingSentTime(std::chrono::steady_clock::now() -
+                            std::chrono::milliseconds(PingFrequencyMs) -
+                            std::chrono::milliseconds(InitialPingDelayMs))
+        , _pingTimeUs(0)
+        , _shuttingDown(false)
+        , _isClient(false)
+#if !MOBILEAPP
+        , _isMasking(false)
+        , _inFragmentBlock(false)
+        , _isManualDefrag(false)
+#endif
     {
         upgradeToWebSocket(request);
     }
@@ -154,7 +160,9 @@ public:
             socket->getInBuffer().clear();
         }
         _wsPayload.clear();
+#if !MOBILEAPP
         _inFragmentBlock = false;
+#endif
         _shuttingDown = false;
     }
 
commit e1707977105f01602c6a6ea9f1645d500850c44b
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Apr 19 10:52:04 2019 +0200
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Apr 19 11:07:31 2019 +0200

    gtkapp: Drop this warning, clang complains about it.
    
    Change-Id: I4f6f27f28d55a6529eb89732a8562e6e27d376af

diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 6475ec24b..6694a88bd 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -2,7 +2,7 @@ bin_PROGRAMS = mobile
 
 include_paths = -I${top_srcdir}/common -I${top_srcdir}/net -I${top_srcdir}/kit -I${top_srcdir}/wsd -I${top_srcdir}
 
-warning_flags = -Wall -Werror -Wno-parentheses -Wno-sign-compare -Wno-unused-variable -Wno-stringop-overflow
+warning_flags = -Wall -Werror -Wno-parentheses -Wno-sign-compare -Wno-unused-variable
 define_flags = -DMOBILEAPP=1
 
 AM_CPPFLAGS = -pthread \


More information about the Libreoffice-commits mailing list