From 23b939c62b7f497d6f99bfe97ad639b35287ac61 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 5 Sep 2017 12:23:12 -0400 Subject: Clear warnings under GCC with -Wall -Wextra --- validat1.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'validat1.cpp') diff --git a/validat1.cpp b/validat1.cpp index 9990c19e..62fa4b67 100644 --- a/validat1.cpp +++ b/validat1.cpp @@ -1909,8 +1909,10 @@ public: template class FixedRoundsCipherFactory : public CipherFactory { public: - FixedRoundsCipherFactory(unsigned int keylen=0) : m_keylen(keylen?keylen:E::DEFAULT_KEYLENGTH) {} - unsigned int BlockSize() const {return E::BLOCKSIZE;} + FixedRoundsCipherFactory(unsigned int keylen=0) : + m_keylen(keylen ? keylen : static_cast(E::DEFAULT_KEYLENGTH)) {} + + unsigned int BlockSize() const {return static_cast(E::BLOCKSIZE);} unsigned int KeyLength() const {return m_keylen;} BlockTransformation* NewEncryption(const byte *keyStr) const @@ -1924,9 +1926,11 @@ public: template class VariableRoundsCipherFactory : public CipherFactory { public: - VariableRoundsCipherFactory(unsigned int keylen=0, unsigned int rounds=0) - : m_keylen(keylen ? keylen : E::DEFAULT_KEYLENGTH), m_rounds(rounds ? rounds : E::DEFAULT_ROUNDS) {} - unsigned int BlockSize() const {return E::BLOCKSIZE;} + VariableRoundsCipherFactory(unsigned int keylen=0, unsigned int rounds=0) : + m_keylen(keylen ? keylen : static_cast(E::DEFAULT_KEYLENGTH)), + m_rounds(rounds ? rounds : static_cast(E::DEFAULT_ROUNDS)) {} + + unsigned int BlockSize() const {return static_cast(E::BLOCKSIZE);} unsigned int KeyLength() const {return m_keylen;} BlockTransformation* NewEncryption(const byte *keyStr) const -- cgit v1.2.1