mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
fixed gcc warnings (missing field initializers, unused functions)
This commit is contained in:
parent
2b9b53024d
commit
46d19261d3
2 changed files with 8 additions and 4 deletions
|
|
@ -17,7 +17,7 @@ bytesConstRef JitVM::go(ExtVMFace& _ext, OnOpFunc const&, uint64_t)
|
|||
Compiler::Options defaultOptions;
|
||||
auto module = Compiler(defaultOptions).compile(_ext.code);
|
||||
|
||||
RuntimeData data = {};
|
||||
RuntimeData data{{},nullptr,nullptr};
|
||||
|
||||
#define set(INDEX, VALUE) data.elems[INDEX] = eth2llvm(VALUE)
|
||||
set(RuntimeData::Gas, m_gas);
|
||||
|
|
@ -63,10 +63,14 @@ bytesConstRef JitVM::go(ExtVMFace& _ext, OnOpFunc const&, uint64_t)
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
// MSVS linker ignores export symbols in Env.cpp if nothing point at least one of them
|
||||
extern "C" void env_sload();
|
||||
void linkerWorkaround() { env_sload(); }
|
||||
void linkerWorkaround()
|
||||
{
|
||||
env_sload();
|
||||
(void)linkerWorkaround; // suppress unused function warning from GCC
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -810,7 +810,7 @@ void Compiler::compileBasicBlock(BasicBlock& _basicBlock, bytes const& _bytecode
|
|||
// This will commit the current cost block
|
||||
_gasMeter.countLogData(numBytes);
|
||||
|
||||
std::array<llvm::Value*, 4> topics{};
|
||||
std::array<llvm::Value*, 4> topics{{}};
|
||||
auto numTopics = static_cast<size_t>(inst) - static_cast<size_t>(Instruction::LOG0);
|
||||
for (size_t i = 0; i < numTopics; ++i)
|
||||
topics[i] = stack.pop();
|
||||
|
|
|
|||
Loading…
Reference in a new issue