Fixed compile warnings.

This commit is contained in:
XMRig 2019-10-22 13:09:58 +07:00
parent f7dcfffdb1
commit 48545c5916
4 changed files with 3 additions and 14 deletions

View file

@ -41,8 +41,7 @@ constexpr size_t pageSize = 2 * 1024 * 1024;
} // namespace xmrig
xmrig::MemoryPool::MemoryPool(size_t size, bool hugePages, uint32_t node) :
m_size(size)
xmrig::MemoryPool::MemoryPool(size_t size, bool hugePages, uint32_t node)
{
if (!size) {
return;

View file

@ -52,7 +52,6 @@ protected:
void release(uint32_t node) override;
private:
size_t m_size = 0;
size_t m_refs = 0;
size_t m_offset = 0;
VirtualMemory *m_memory = nullptr;

View file

@ -34,15 +34,6 @@
#include <algorithm>
namespace xmrig {
constexpr size_t pageSize = 2 * 1024 * 1024;
} // namespace xmrig
xmrig::NUMAMemoryPool::NUMAMemoryPool(size_t size, bool hugePages) :
m_hugePages(hugePages),
m_nodeSize(std::max<size_t>(size / Cpu::info()->nodes(), 1)),

View file

@ -46,7 +46,7 @@ xmrig::RxQueue::RxQueue(IRxListener *listener) :
uv_async_init(uv_default_loop(), m_async, [](uv_async_t *handle) { static_cast<RxQueue *>(handle->data)->onReady(); });
m_thread = std::move(std::thread(&RxQueue::backgroundInit, this));
m_thread = std::thread(&RxQueue::backgroundInit, this);
}
@ -158,7 +158,7 @@ void xmrig::RxQueue::backgroundInit()
m_storage->init(item.seed, item.threads, item.hugePages);
lock = std::move(std::unique_lock<std::mutex>(m_mutex));
lock = std::unique_lock<std::mutex>(m_mutex);
if (m_state == STATE_SHUTDOWN || !m_queue.empty()) {
continue;