Merge pull request #10359 from ethereum/extra-semi

Enable the -Wextra-semi warning
This commit is contained in:
Daniel Kirchner 2020-12-07 14:35:30 +01:00 committed by GitHub
commit 6c70208d5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 5 deletions

View File

@ -52,6 +52,13 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
add_compile_options(-Wimplicit-fallthrough)
add_compile_options(-Wsign-conversion)
# While this should work on CMake 3.3+, it fails on Ubuntu 18
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.16)
eth_add_cxx_compiler_flag_if_supported(
$<$<COMPILE_LANGUAGE:CXX>:-Wextra-semi>
)
endif()
# Configuration-specific compiler settings.
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -DETH_DEBUG")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")

View File

@ -76,7 +76,7 @@ public:
}
VariableDeclaration const& declaration() const { return m_declaration; }
Kind kind() const { return m_occurrenceKind; };
Kind kind() const { return m_occurrenceKind; }
std::optional<langutil::SourceLocation> const& occurrence() const { return m_occurrence; }
private:
/// Declaration of the occurring variable.

View File

@ -135,7 +135,7 @@ public:
/// @returns a new copy of the utility function generator (but using the same function set).
YulUtilFunctions utils();
langutil::EVMVersion evmVersion() const { return m_evmVersion; };
langutil::EVMVersion evmVersion() const { return m_evmVersion; }
ABIFunctions abiFunctions();

View File

@ -84,7 +84,7 @@ public:
return Step::invalidInCurrentEnvironment();
else
return std::nullopt;
};
}
};

View File

@ -71,7 +71,7 @@ struct CommonOptions: boost::noncopyable
static void setSingleton(std::unique_ptr<CommonOptions const>&& _instance);
CommonOptions(std::string caption = "");
virtual ~CommonOptions() {};
virtual ~CommonOptions() {}
protected:
boost::program_options::options_description options;

View File

@ -121,7 +121,7 @@ public:
CacheStats gatherStats() const;
std::map<std::string, CacheEntry> const& entries() const { return m_entries; };
std::map<std::string, CacheEntry> const& entries() const { return m_entries; }
Program const& program() const { return m_program; }
size_t currentRound() const { return m_currentRound; }