mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix some warnings about uninitialized members.
This commit is contained in:
parent
a2375542e6
commit
9866caa625
@ -30,7 +30,7 @@ namespace solidity {
|
|||||||
class Compiler: private ASTConstVisitor
|
class Compiler: private ASTConstVisitor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit Compiler(bool _optimize = false): m_optimize(_optimize), m_returnTag(m_context.newTag()) {}
|
explicit Compiler(bool _optimize = false): m_optimize(_optimize), m_context(), m_returnTag(m_context.newTag()) {}
|
||||||
|
|
||||||
void compileContract(ContractDefinition const& _contract, std::vector<MagicVariableDeclaration const*> const& _magicGlobals,
|
void compileContract(ContractDefinition const& _contract, std::vector<MagicVariableDeclaration const*> const& _magicGlobals,
|
||||||
std::map<ContractDefinition const*, bytes const*> const& _contracts);
|
std::map<ContractDefinition const*, bytes const*> const& _contracts);
|
||||||
|
@ -113,7 +113,7 @@ private:
|
|||||||
|
|
||||||
struct Contract
|
struct Contract
|
||||||
{
|
{
|
||||||
ContractDefinition const* contract;
|
ContractDefinition const* contract = nullptr;
|
||||||
std::shared_ptr<Compiler> compiler;
|
std::shared_ptr<Compiler> compiler;
|
||||||
bytes bytecode;
|
bytes bytecode;
|
||||||
std::shared_ptr<InterfaceHandler> interfaceHandler;
|
std::shared_ptr<InterfaceHandler> interfaceHandler;
|
||||||
|
@ -146,12 +146,12 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
CompilerContext* m_context;
|
CompilerContext* m_context;
|
||||||
LValueType m_type;
|
LValueType m_type = NONE;
|
||||||
/// If m_type is STACK, this is base stack offset (@see
|
/// If m_type is STACK, this is base stack offset (@see
|
||||||
/// CompilerContext::getBaseStackOffsetOfVariable) of a local variable.
|
/// CompilerContext::getBaseStackOffsetOfVariable) of a local variable.
|
||||||
unsigned m_baseStackOffset;
|
unsigned m_baseStackOffset = 0;
|
||||||
/// Size of the value of this lvalue on the stack.
|
/// Size of the value of this lvalue on the stack.
|
||||||
unsigned m_stackSize;
|
unsigned m_stackSize = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool m_optimize;
|
bool m_optimize;
|
||||||
|
@ -56,7 +56,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<std::shared_ptr<MagicVariableDeclaration const>> m_magicVariables;
|
std::vector<std::shared_ptr<MagicVariableDeclaration const>> m_magicVariables;
|
||||||
ContractDefinition const* m_currentContract;
|
ContractDefinition const* m_currentContract = nullptr;
|
||||||
std::map<ContractDefinition const*, std::shared_ptr<MagicVariableDeclaration const>> mutable m_thisPointer;
|
std::map<ContractDefinition const*, std::shared_ptr<MagicVariableDeclaration const>> mutable m_thisPointer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ private:
|
|||||||
/// not contain code.
|
/// not contain code.
|
||||||
std::map<ASTNode const*, DeclarationContainer> m_scopes;
|
std::map<ASTNode const*, DeclarationContainer> m_scopes;
|
||||||
|
|
||||||
DeclarationContainer* m_currentScope;
|
DeclarationContainer* m_currentScope = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user