More static analysis fixes

This commit is contained in:
SChernykh 2020-12-08 16:05:58 +01:00
parent cafd868773
commit 0da3390d09
14 changed files with 40 additions and 33 deletions

View file

@ -155,7 +155,7 @@ void xmrig::RxQueue::backgroundInit()
m_storage->init(item.seed, item.threads, item.hugePages, item.oneGbPages, item.mode, item.priority);
lock = std::unique_lock<std::mutex>(m_mutex);
lock.lock();
if (m_state == STATE_SHUTDOWN || !m_queue.empty()) {
continue;

View file

@ -103,7 +103,7 @@ static bool wrmsr_on_cpu(uint32_t reg, uint32_t cpu, uint64_t value, uint64_t ma
char msr_file_name[64]{};
sprintf(msr_file_name, "/dev/cpu/%d/msr", cpu);
sprintf(msr_file_name, "/dev/cpu/%u/msr", cpu);
int fd = open(msr_file_name, O_WRONLY);
if (fd < 0) {
return false;