From b8f9f3cffe541b1da477463aa6639c498fe138fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 8 Jan 2015 15:06:50 +0100 Subject: [PATCH] Fix warnings --- libevmjit/BasicBlock.h | 4 ++-- libevmjit/Cache.h | 1 - libevmjit/ExecutionEngine.cpp | 5 +++++ libevmjit/Ext.h | 4 ++-- libevmjit/Runtime.h | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/libevmjit/BasicBlock.h b/libevmjit/BasicBlock.h index 4a789a8ec9..dd099af8a0 100644 --- a/libevmjit/BasicBlock.h +++ b/libevmjit/BasicBlock.h @@ -102,12 +102,12 @@ private: /// the item below the top and so on. The stack grows as the code /// accesses more items on the EVM stack but once a value is put on /// the stack, it will never be replaced. - std::vector m_initialStack = {}; + std::vector m_initialStack; /// This stack tracks the contents of the EVM stack as the basic block /// executes. It may grow on both sides, as the code pushes items on /// top of the stack or changes existing items. - std::vector m_currentStack = {}; + std::vector m_currentStack; /// How many items higher is the current stack than the initial one. /// May be negative. diff --git a/libevmjit/Cache.h b/libevmjit/Cache.h index 80fe47aded..d1027288ec 100644 --- a/libevmjit/Cache.h +++ b/libevmjit/Cache.h @@ -2,7 +2,6 @@ #include #include -#include #include diff --git a/libevmjit/ExecutionEngine.cpp b/libevmjit/ExecutionEngine.cpp index 8625865757..499312b380 100644 --- a/libevmjit/ExecutionEngine.cpp +++ b/libevmjit/ExecutionEngine.cpp @@ -4,8 +4,13 @@ #include #include +#pragma warning(push) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" #include #include +#pragma warning(pop) +#pragma GCC diagnostic pop #include #include #include diff --git a/libevmjit/Ext.h b/libevmjit/Ext.h index 2850be072b..e6f1e46675 100644 --- a/libevmjit/Ext.h +++ b/libevmjit/Ext.h @@ -65,8 +65,8 @@ private: llvm::Value* m_size; llvm::Value* m_data = nullptr; - std::array::value> m_funcs = {}; - std::array m_argAllocas = {}; + std::array::value> m_funcs = {{}}; + std::array m_argAllocas = {{}}; size_t m_argCounter = 0; llvm::CallInst* createCall(EnvFunc _funcId, std::initializer_list const& _args); diff --git a/libevmjit/Runtime.h b/libevmjit/Runtime.h index cedfaaf70e..8cc5b79686 100644 --- a/libevmjit/Runtime.h +++ b/libevmjit/Runtime.h @@ -48,7 +48,7 @@ private: Env& m_env; ///< Pointer to environment proxy. Expected by compiled contract. jmp_buf_ref m_currJmpBuf; ///< Pointer to jump buffer. Expected by compiled contract. byte* m_memoryData = nullptr; - i256 m_memorySize = {}; + i256 m_memorySize; std::jmp_buf m_jmpBuf; StackImpl m_stack; MemoryImpl m_memory;