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_rc4.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_rc4.cpp')
-rw-r--r-- | src/lib/prov/openssl/openssl_rc4.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/prov/openssl/openssl_rc4.cpp b/src/lib/prov/openssl/openssl_rc4.cpp index 84d739c91..79ad98ca4 100644 --- a/src/lib/prov/openssl/openssl_rc4.cpp +++ b/src/lib/prov/openssl/openssl_rc4.cpp @@ -21,9 +21,9 @@ namespace { class OpenSSL_RC4 : public StreamCipher { public: - void clear() { clear_mem(&m_rc4, 1); } + void clear() override { clear_mem(&m_rc4, 1); } - std::string name() const + std::string name() const override { switch(m_skip) { @@ -36,9 +36,9 @@ class OpenSSL_RC4 : public StreamCipher } } - StreamCipher* clone() const { return new OpenSSL_RC4; } + StreamCipher* clone() const override { return new OpenSSL_RC4; } - Key_Length_Specification key_spec() const + Key_Length_Specification key_spec() const override { return Key_Length_Specification(1, 32); } @@ -46,12 +46,12 @@ class OpenSSL_RC4 : public StreamCipher OpenSSL_RC4(size_t skip = 0) : m_skip(skip) { clear(); } ~OpenSSL_RC4() { clear(); } private: - void cipher(const byte in[], byte out[], size_t length) + void cipher(const byte in[], byte out[], size_t length) override { ::RC4(&m_rc4, length, in, out); } - void key_schedule(const byte key[], size_t length) + void key_schedule(const byte key[], size_t length) override { ::RC4_set_key(&m_rc4, length, key); byte d = 0; |