[botan-devel] Warning with v1.10.0

Jack Lloyd lloyd at randombit.net
Wed Jun 22 05:32:54 EDT 2011


Nothing wrong I would say, I just don't compile with -Wshadow so I
never noticed it. I'll add it to the maintainer-mode flags so it shows
up in the future if I do this.

I'll fix it in the next release, in the meantime

============================================================
--- src/utils/exceptn.h d21a9b750e24532aa6bc721b3a3899a4989f1739
+++ src/utils/exceptn.h 509a3e318bc7579df692592561beacf548beb84d
@@ -146,8 +146,8 @@ struct BOTAN_DLL Integrity_Failure : pub
 */
 struct BOTAN_DLL Integrity_Failure : public Exception
    {
-   Integrity_Failure(const std::string& what) :
-      Exception("Integrity failure: " + what) {}
+   Integrity_Failure(const std::string& msg) :
+      Exception("Integrity failure: " + msg) {}
    };

should do the trick.

-Jack

On Tue, Jun 21, 2011 at 09:28:48PM -0700, William K. Foster wrote:
> Hi Jack,
> 
> Am I doing something wrong, or is this a known issue?
> 
> ../../src/Botan-1.10.0/build/include/botan/exceptn.h: In constructor
> `Botan::Integrity_Failure::Integrity_Failure(const std::string&)':
> ../../src/Botan-1.10.0/build/include/botan/exceptn.h:149: warning:
> declaration of 'what' shadows a member of 'this'
> 
> Thanks.
> 
> -William



More information about the botan-devel mailing list