From 30edf16ca6fabc22f47e10b18cb1fafb62ad5a82 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sat, 20 Feb 2016 18:06:12 -0500 Subject: Avoid some Wshadows in GCC 4.8 In GCC 4.7 and 4.8, Wshadow also warns if a local variable conflicts with a member function. This was changed in GCC 4.9 (GCC bugzilla 57709) but causes a lot of warnings on Travis which is on 4.8. Clang's Wshadow behaves like GCC 4.9 The worst offendor was Exception's constructor argument being named `what` which conflicts with the member function of the same name, being in a public header this causes so many warnings the Travis log files are truncated. This fixes Exception and a couple of others. Fixing all cases would be a slog that I'm not up for right at the moment. --- src/lib/block/lion/lion.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/block/lion/lion.cpp') diff --git a/src/lib/block/lion/lion.cpp b/src/lib/block/lion/lion.cpp index 559816aea..7ae620504 100644 --- a/src/lib/block/lion/lion.cpp +++ b/src/lib/block/lion/lion.cpp @@ -130,8 +130,8 @@ void Lion::clear() /* * Lion Constructor */ -Lion::Lion(HashFunction* hash, StreamCipher* cipher, size_t block_size) : - m_block_size(std::max(2*hash->output_length() + 1, block_size)), +Lion::Lion(HashFunction* hash, StreamCipher* cipher, size_t bs) : + m_block_size(std::max(2*hash->output_length() + 1, bs)), m_hash(hash), m_cipher(cipher) { -- cgit v1.2.3