kit/Kit.cpp | 2 ++ net/WebSocketHandler.hpp | 3 +-- wsd/DocumentBroker.cpp | 3 ++- wsd/LOOLWSD.cpp | 21 +++++++++++++-------- wsd/Storage.cpp | 2 +- 5 files changed, 19 insertions(+), 12 deletions(-)
New commits: commit ffe66b3efc1809415fb78f3525b2e9b6e1518d17 Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Tue Oct 30 21:52:26 2018 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Tue Oct 30 22:03:04 2018 +0200 Avoid 'Unused variable' warnings in the MOBILEAPP casse Change-Id: I30d631559379da4baa5a73712f002435b1a36360 diff --git a/kit/Kit.cpp b/kit/Kit.cpp index 46fb1efe4..d063e0bb6 100644 --- a/kit/Kit.cpp +++ b/kit/Kit.cpp @@ -757,7 +757,9 @@ private: std::vector<unsigned char> _pixmap; }; +#ifndef MOBILEAPP static FILE* ProcSMapsFile = nullptr; +#endif /// A document container. /// Owns LOKitDocument instance and connections. diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp index f6457787e..a037cb6b5 100644 --- a/net/WebSocketHandler.hpp +++ b/net/WebSocketHandler.hpp @@ -209,7 +209,6 @@ public: _wsPayload.insert(_wsPayload.end(), p, p + len); const size_t headerLen = 0; const size_t payloadLen = len; - const bool hasMask = false; #endif assert(_wsPayload.size() >= payloadLen); @@ -445,9 +444,9 @@ private: socket->assertCorrectThread(); std::vector<char>& out = socket->getOutBuffer(); - const size_t oldSize = out.size(); #ifndef MOBILEAPP + const size_t oldSize = out.size(); out.push_back(flags); diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index 015deb26e..2aa4edda8 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -473,9 +473,10 @@ bool DocumentBroker::load(const std::shared_ptr<ClientSession>& session, const s std::string userId, username; std::string userExtraInfo; std::string watermarkText; - std::chrono::duration<double> getInfoCallDuration(0); #ifndef MOBILEAPP + std::chrono::duration<double> getInfoCallDuration(0); + WopiStorage* wopiStorage = dynamic_cast<WopiStorage*>(_storage.get()); if (wopiStorage != nullptr) { diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 8d281a2f5..e7e49e021 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -189,13 +189,6 @@ ServerSocket::Type ClientListenAddr = ServerSocket::Type::Public; /// Port for prisoners to connect to int MasterPortNumber = DEFAULT_MASTER_PORT_NUMBER; -/// New LOK child processes ready to host documents. -//TODO: Move to a more sensible namespace. -static bool DisplayVersion = false; - -/// Funky latency simulation basic delay (ms) -static int SimulatedLatencyMs = 0; - // Tracks the set of prisoners / children waiting to be used. static std::mutex NewChildrenMutex; static std::condition_variable NewChildrenCV; @@ -219,8 +212,19 @@ std::string LOOLWSD::Cache = LOOLWSD_CACHEDIR; std::set<std::string> LOOLWSD::EditFileExtensions; #ifdef MOBILEAPP + // Or can this be retreieved in some other way? int LOOLWSD::prisonerServerSocketFD; + +#else + +/// New LOK child processes ready to host documents. +//TODO: Move to a more sensible namespace. +static bool DisplayVersion = false; + +/// Funky latency simulation basic delay (ms) +static int SimulatedLatencyMs = 0; + #endif namespace @@ -1789,11 +1793,12 @@ private: Poco::MemoryInputStream message(&socket->getInBuffer()[0], socket->getInBuffer().size());; Poco::Net::HTTPRequest request; - size_t requestSize = 0; try { #ifndef MOBILEAPP + size_t requestSize = 0; + if (!socket->parseHeader("Prisoner", message, request, &requestSize)) return; diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp index c589e988e..8e46dc333 100644 --- a/wsd/Storage.cpp +++ b/wsd/Storage.cpp @@ -86,8 +86,8 @@ size_t StorageBase::getFileSize(const std::string& filename) void StorageBase::initialize() { - const auto& app = Poco::Util::Application::instance(); #ifndef MOBILEAPP + const auto& app = Poco::Util::Application::instance(); FilesystemEnabled = app.config().getBool("storage.filesystem[@allow]", false); // Parse the WOPI settings. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits