Fixed warnings.
This commit is contained in:
parent
bcae974ea1
commit
4f49533e98
7 changed files with 21 additions and 23 deletions
|
@ -233,7 +233,7 @@ RandomX_ConfigurationBase RandomX_CurrentConfig;
|
|||
extern "C" {
|
||||
|
||||
randomx_cache *randomx_alloc_cache(randomx_flags flags) {
|
||||
randomx_cache *cache;
|
||||
randomx_cache *cache = nullptr;
|
||||
|
||||
try {
|
||||
cache = new randomx_cache();
|
||||
|
@ -297,7 +297,7 @@ extern "C" {
|
|||
}
|
||||
|
||||
randomx_dataset *randomx_alloc_dataset(randomx_flags flags) {
|
||||
randomx_dataset *dataset;
|
||||
randomx_dataset *dataset = nullptr;
|
||||
|
||||
try {
|
||||
dataset = new randomx_dataset();
|
||||
|
@ -430,14 +430,12 @@ extern "C" {
|
|||
assert(inputSize == 0 || input != nullptr);
|
||||
assert(output != nullptr);
|
||||
alignas(16) uint64_t tempHash[8];
|
||||
int blakeResult = blake2b(tempHash, sizeof(tempHash), input, inputSize, nullptr, 0);
|
||||
assert(blakeResult == 0);
|
||||
blake2b(tempHash, sizeof(tempHash), input, inputSize, nullptr, 0);
|
||||
machine->initScratchpad(&tempHash);
|
||||
machine->resetRoundingMode();
|
||||
for (int chain = 0; chain < RandomX_CurrentConfig.ProgramCount - 1; ++chain) {
|
||||
for (uint32_t chain = 0; chain < RandomX_CurrentConfig.ProgramCount - 1; ++chain) {
|
||||
machine->run(&tempHash);
|
||||
blakeResult = blake2b(tempHash, sizeof(tempHash), machine->getRegisterFile(), sizeof(randomx::RegisterFile), nullptr, 0);
|
||||
assert(blakeResult == 0);
|
||||
blake2b(tempHash, sizeof(tempHash), machine->getRegisterFile(), sizeof(randomx::RegisterFile), nullptr, 0);
|
||||
}
|
||||
machine->run(&tempHash);
|
||||
machine->getFinalResult(output, RANDOMX_HASH_SIZE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue