Merge pull request #8013 from ethereum/warnings

Enable more warnings in the build system
This commit is contained in:
chriseth 2020-01-15 18:00:14 +01:00 committed by GitHub
commit c017072bac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 5 deletions

View File

@ -34,6 +34,9 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
add_compile_options(-Wall)
add_compile_options(-Wextra)
add_compile_options(-Werror)
add_compile_options(-pedantic)
add_compile_options(-Wno-unknown-pragmas)
add_compile_options(-Wimplicit-fallthrough)
# Configuration-specific compiler settings.
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -DETH_DEBUG")

View File

@ -65,7 +65,7 @@ struct EVMBuiltins
template<typename... Args> constexpr Pattern operator()(Args&&... _args) const
{
return {inst, {std::forward<Args>(_args)...}};
};
}
};
struct PatternGeneratorInstance
@ -74,7 +74,7 @@ struct EVMBuiltins
template<typename... Args> constexpr Pattern operator()(Args&&... _args) const
{
return {instruction, {std::forward<Args>(_args)...}};
};
}
};

View File

@ -2354,7 +2354,7 @@ string EnumType::canonicalName() const
size_t EnumType::numberOfMembers() const
{
return m_enum.members().size();
};
}
BoolResult EnumType::isExplicitlyConvertibleTo(Type const& _convertTo) const
{

View File

@ -340,7 +340,6 @@ void StorageItem::storeValue(Type const& _sourceType, SourceLocation const& _loc
{
solAssert(sourceType.location() == DataLocation::Memory, "");
// stack layout: source_ref target_ref
TypePointer sourceMemberType = sourceType.memberType(member.name);
m_context << sourceType.memoryOffsetOfMember(member.name);
m_context << Instruction::DUP3 << Instruction::ADD;
MemoryItem(m_context, *sourceMemberType).retrieveValue(_location, true);

View File

@ -29,7 +29,7 @@ using namespace std;
using namespace solidity::frontend;
// TODO: Fix Boost...
BOOST_TEST_DONT_PRINT_LOG_VALUE(solidity::bytes);
BOOST_TEST_DONT_PRINT_LOG_VALUE(solidity::bytes)
namespace solidity::util::test
{