loolwsd/DocumentBroker.cpp | 4 ++++ loolwsd/LOOLKit.cpp | 2 ++ loolwsd/LOOLSession.cpp | 1 + loolwsd/LibreOfficeKit.hpp | 6 ++++-- loolwsd/MessageQueue.hpp | 3 ++- loolwsd/TileCache.cpp | 4 +++- loolwsd/TraceFile.hpp | 7 +++++-- loolwsd/Unit.cpp | 3 ++- 8 files changed, 23 insertions(+), 7 deletions(-)
New commits: commit 31867f669d0bc3c8b1e517cbdf512133c387073f Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Sep 28 10:20:24 2016 +0200 Fix remaining uninitialized members The missing init of mutexes is probably theoretical, the TraceFile and the Unit ones were real errors, I think. Change-Id: If19c23a9c93d34059998346af8d45c26a34043a6 diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp index f8266a7..d1dd3ac 100644 --- a/loolwsd/DocumentBroker.cpp +++ b/loolwsd/DocumentBroker.cpp @@ -112,6 +112,8 @@ DocumentBroker::DocumentBroker() : _cursorHeight(0), _isLoaded(false), _isModified(false), + _mutex(), + _saveMutex(), _tileVersion(0) { Log::info("Empty DocumentBroker (marked to destroy) created."); @@ -135,6 +137,8 @@ DocumentBroker::DocumentBroker(const Poco::URI& uriPublic, _cursorHeight(0), _isLoaded(false), _isModified(false), + _mutex(), + _saveMutex(), _tileVersion(0) { assert(!_docKey.empty()); diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp index e926056..da06fb8 100644 --- a/loolwsd/LOOLKit.cpp +++ b/loolwsd/LOOLKit.cpp @@ -258,6 +258,7 @@ public: _sessionId(session->getId()), _session(std::move(session)), _ws(std::move(ws)), + _threadMutex(), _joined(false) { Log::info("Connection ctor in child for " + _sessionId); @@ -406,6 +407,7 @@ public: _isDocPasswordProtected(false), _docPasswordType(PasswordType::ToView), _stop(false), + _mutex(), _isLoading(0), _clientViews(0) { diff --git a/loolwsd/LOOLSession.cpp b/loolwsd/LOOLSession.cpp index 1af3ddb..3b2c0d3 100644 --- a/loolwsd/LOOLSession.cpp +++ b/loolwsd/LOOLSession.cpp @@ -60,6 +60,7 @@ LOOLSession::LOOLSession(const std::string& id, const Kind kind, _isActive(true), _lastActivityTime(std::chrono::steady_clock::now()), _isCloseFrame(false), + _mutex(), _docPassword(""), _haveDocPassword(false), _isDocPasswordProtected(false) diff --git a/loolwsd/LibreOfficeKit.hpp b/loolwsd/LibreOfficeKit.hpp index c7319e7..7f0c14f 100644 --- a/loolwsd/LibreOfficeKit.hpp +++ b/loolwsd/LibreOfficeKit.hpp @@ -29,7 +29,8 @@ private: public: /// A lok::Document is typically created by the lok::Office::documentLoad() method. inline Document(LibreOfficeKitDocument* pDoc) : - _pDoc(pDoc) + _pDoc(pDoc), + _mutex() { Log::trace("lok::Document ctor."); } @@ -492,7 +493,8 @@ private: public: /// A lok::Office is typically created by the lok_cpp_init() function. inline Office(LibreOfficeKit* pThis) : - _pOffice(pThis) + _pOffice(pThis), + _mutex() { Log::trace("lok::Office ctor."); assert(_pOffice); diff --git a/loolwsd/MessageQueue.hpp b/loolwsd/MessageQueue.hpp index 1127454..3cf21f6 100644 --- a/loolwsd/MessageQueue.hpp +++ b/loolwsd/MessageQueue.hpp @@ -27,7 +27,8 @@ public: typedef std::vector<char> Payload; - MessageQueue() + MessageQueue() : + _mutex() { } diff --git a/loolwsd/TileCache.cpp b/loolwsd/TileCache.cpp index 1f9694c..91b95cd 100644 --- a/loolwsd/TileCache.cpp +++ b/loolwsd/TileCache.cpp @@ -47,7 +47,9 @@ TileCache::TileCache(const std::string& docURL, const Timestamp& modifiedTime, const std::string& cacheDir) : _docURL(docURL), - _cacheDir(cacheDir) + _cacheDir(cacheDir), + _cacheMutex(), + _tilesBeingRenderedMutex() { Log::info() << "TileCache ctor for uri [" << _docURL << "] modifiedTime=" << (modifiedTime.raw()/1000000) diff --git a/loolwsd/TraceFile.hpp b/loolwsd/TraceFile.hpp index 8c32d47..80c6bd7 100644 --- a/loolwsd/TraceFile.hpp +++ b/loolwsd/TraceFile.hpp @@ -31,7 +31,9 @@ public: }; TraceFileRecord() : - Dir(Direction::Invalid) + Dir(Direction::Invalid), + TimestampNs(0), + Pid(0) { } @@ -54,7 +56,8 @@ public: _compress(compress), _filter(true), _stream(path, compress ? std::ios::binary : std::ios::out), - _deflater(_stream, Poco::DeflatingStreamBuf::STREAM_GZIP) + _deflater(_stream, Poco::DeflatingStreamBuf::STREAM_GZIP), + _mutex() { for (const auto& f : filters) { diff --git a/loolwsd/Unit.cpp b/loolwsd/Unit.cpp index c566a08..6c050cf 100644 --- a/loolwsd/Unit.cpp +++ b/loolwsd/Unit.cpp @@ -110,7 +110,8 @@ UnitBase::UnitBase() _setRetValue(false), _retValue(0), _timeoutMilliSeconds(30 * 1000), - _timeoutShutdown(false) + _timeoutShutdown(false), + _type(TYPE_WSD) { } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits