Fix recently introduced clang warnings

kit/Kit.cpp:2166:17: error: private field '_socketPoll' is not used [-Werror,-Wunused-private-field]

/usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/ext/new_allocator.h:140:22: error: destructor called on non-final 'Document' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-abstract-non-virtual-dtor]

Change-Id: I47849db2b0bc64e811577e3a8cede0e2d2c0e2e6
This commit is contained in:
Miklos Vajna 2019-05-10 16:39:10 +02:00
parent 73dc711e0a
commit eb376d122f

View file

@ -873,7 +873,7 @@ public:
const std::string& docId, const std::string& docId,
const std::string& url, const std::string& url,
std::shared_ptr<TileQueue> tileQueue, std::shared_ptr<TileQueue> tileQueue,
SocketPoll& socketPoll, SocketPoll& /*socketPoll*/,
const std::shared_ptr<WebSocketHandler>& websocketHandler) const std::shared_ptr<WebSocketHandler>& websocketHandler)
: _loKit(loKit), : _loKit(loKit),
_jailId(jailId), _jailId(jailId),
@ -882,7 +882,6 @@ public:
_url(url), _url(url),
_obfuscatedFileId(Util::getFilenameFromURL(docKey)), _obfuscatedFileId(Util::getFilenameFromURL(docKey)),
_tileQueue(std::move(tileQueue)), _tileQueue(std::move(tileQueue)),
_socketPoll(socketPoll),
_websocketHandler(websocketHandler), _websocketHandler(websocketHandler),
_docPassword(""), _docPassword(""),
_haveDocPassword(false), _haveDocPassword(false),
@ -904,7 +903,7 @@ public:
#endif #endif
} }
~Document() virtual ~Document()
{ {
LOG_INF("~Document dtor for [" << _docKey << LOG_INF("~Document dtor for [" << _docKey <<
"] url [" << anonymizeUrl(_url) << "] on child [" << _jailId << "] url [" << anonymizeUrl(_url) << "] on child [" << _jailId <<
@ -2163,7 +2162,6 @@ private:
std::shared_ptr<lok::Document> _loKitDocument; std::shared_ptr<lok::Document> _loKitDocument;
std::shared_ptr<TileQueue> _tileQueue; std::shared_ptr<TileQueue> _tileQueue;
SocketPoll& _socketPoll;
std::shared_ptr<WebSocketHandler> _websocketHandler; std::shared_ptr<WebSocketHandler> _websocketHandler;
std::mutex _pngMutex; std::mutex _pngMutex;