Merge pull request #3082 from SChernykh/dev

Fixed GCC 12 warnings
This commit is contained in:
xmrig 2022-07-03 16:59:26 +07:00 committed by GitHub
commit 4c57b60e59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View file

@ -66,7 +66,6 @@ Storage<DaemonClient> DaemonClient::m_storage;
static const char* kBlocktemplateBlob = "blocktemplate_blob"; static const char* kBlocktemplateBlob = "blocktemplate_blob";
static const char* kBlockhashingBlob = "blockhashing_blob"; static const char* kBlockhashingBlob = "blockhashing_blob";
static const char* kLastError = "lasterror";
static const char *kGetHeight = "/getheight"; static const char *kGetHeight = "/getheight";
static const char *kGetInfo = "/getinfo"; static const char *kGetInfo = "/getinfo";
static const char *kHash = "hash"; static const char *kHash = "hash";

View file

@ -240,10 +240,17 @@ namespace randomx {
return x; return x;
} }
void cleanup() {
for (unsigned i = 0; i < RegistersCount; ++i) {
registerUsage[i] = -1;
}
nreg = nullptr;
}
private: private:
static const int_reg_t zero; static const int_reg_t zero;
int registerUsage[RegistersCount]; int registerUsage[RegistersCount] = {};
NativeRegisterFile* nreg; NativeRegisterFile* nreg = nullptr;
static void* getScratchpadAddress(InstructionByteCode& ibc, uint8_t* scratchpad) { static void* getScratchpadAddress(InstructionByteCode& ibc, uint8_t* scratchpad) {
uint32_t addr = (*ibc.isrc + ibc.imm) & ibc.memMask; uint32_t addr = (*ibc.isrc + ibc.imm) & ibc.memMask;

View file

@ -104,6 +104,8 @@ namespace randomx {
for (unsigned i = 0; i < RegisterCountFlt; ++i) for (unsigned i = 0; i < RegisterCountFlt; ++i)
rx_store_vec_f128(&reg.e[i].lo, nreg.e[i]); rx_store_vec_f128(&reg.e[i].lo, nreg.e[i]);
cleanup();
} }
template<int softAes> template<int softAes>