diff options
author | Jack Lloyd <[email protected]> | 2016-01-17 19:02:13 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-01-17 19:10:33 -0500 |
commit | 6fcbd57915d7870c2782bd6e098903353e8756b0 (patch) | |
tree | c40505fbf8021819dc15d8a632a2d6fb5557f2aa /src/lib/prov/openssl/openssl_hash.cpp | |
parent | de22a9eda8bfb087b690feb962fae8313ee526d4 (diff) |
Add missing overrides and fix -Wpedantic 'extra ;' warnings
Remove -Wsuggest-attribute=noreturn from maintainer mode flags as it
seems like outside of the assertion failure macro any other suggestion
would always be a false positive (an unimplemented function or the like).
Or at least, if such a function needing noreturn to assist with static
analysis is added in the future it will be obvious, by virtue of the
static analyzer warnings which occur due to the missing noreturn
preventing the analyzer from understanding code flow.
Diffstat (limited to 'src/lib/prov/openssl/openssl_hash.cpp')
-rw-r--r-- | src/lib/prov/openssl/openssl_hash.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/prov/openssl/openssl_hash.cpp b/src/lib/prov/openssl/openssl_hash.cpp index c89dd777d..574cfed91 100644 --- a/src/lib/prov/openssl/openssl_hash.cpp +++ b/src/lib/prov/openssl/openssl_hash.cpp @@ -17,26 +17,26 @@ namespace { class OpenSSL_HashFunction : public HashFunction { public: - void clear() + void clear() override { const EVP_MD* algo = EVP_MD_CTX_md(&m_md); EVP_DigestInit_ex(&m_md, algo, nullptr); } - std::string name() const { return m_name; } + std::string name() const override { return m_name; } - HashFunction* clone() const + HashFunction* clone() const override { const EVP_MD* algo = EVP_MD_CTX_md(&m_md); return new OpenSSL_HashFunction(algo, name()); } - size_t output_length() const + size_t output_length() const override { return EVP_MD_size(EVP_MD_CTX_md(&m_md)); } - size_t hash_block_size() const + size_t hash_block_size() const override { return EVP_MD_block_size(EVP_MD_CTX_md(&m_md)); } @@ -53,12 +53,12 @@ class OpenSSL_HashFunction : public HashFunction } private: - void add_data(const byte input[], size_t length) + void add_data(const byte input[], size_t length) override { EVP_DigestUpdate(&m_md, input, length); } - void final_result(byte output[]) + void final_result(byte output[]) override { EVP_DigestFinal_ex(&m_md, output, nullptr); const EVP_MD* algo = EVP_MD_CTX_md(&m_md); @@ -80,7 +80,7 @@ make_evp_hash_maker(const EVP_MD* md, const char* algo) #define BOTAN_REGISTER_OPENSSL_EVP_HASH(NAME, EVP) \ BOTAN_REGISTER_TYPE(HashFunction, OpenSSL_HashFunction ## EVP, NAME, \ - make_evp_hash_maker(EVP(), NAME), "openssl", BOTAN_OPENSSL_HASH_PRIO); + make_evp_hash_maker(EVP(), NAME), "openssl", BOTAN_OPENSSL_HASH_PRIO) #if !defined(OPENSSL_NO_SHA) BOTAN_REGISTER_OPENSSL_EVP_HASH("SHA-160", EVP_sha1); |