What makes you believe it isn't a bug? The offending line, inside of StandardReallocate, looks like this: A b; where 'A' is a templated class; in the case I'm looking at, 'A' is actually an AllocatorWithCleanup<unsigned char>. The templated AllocatorWithCleanup class has no constructors, but even defining a constructor doesn't make the warning go away.
So if I have a class, and I instantiate an object of that class, that doesn't sound to me like a "local variable that isn't initialized"... Chris -----Original Message----- From: Jeffrey Walton [mailto:[EMAIL PROTECTED] Sent: Saturday, October 15, 2005 5:02 AM To: [email protected] Subject: Re: local variable 'b' used without having been initialized Hi Chris, > I'm thinking it's a compiler bug, has anyone > found a workaround? It is not a bug. I typically set my workspace/project (Visual C++ nomenclature) to Warning Level 4. Since this is Wei's library, I will do the following in my code when bringing in Crypto++ headers: #pragma warning( push, 3 ) # pragma warning( disable: 4700 ) // Unused Variable Names... # pragma warning( disable: 4706 ) // Long Names... // .... #pragma warning( pop ) I only do this for Crypto++ headers (or PJ's STL) Jeff ----- Original Message ----- From: "Chris Shearer Cooper" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, October 14, 2005 10:12 PM Subject: local variable 'b' used without having been initialized > Anybody else seeing this? > > secblock.h(98) : warning C4700: local variable 'b' used without having been > initialized > > It's complaining about the object of class A found inside the > StandardReallocate function. This warning only shows up when I compile it > for release (using MSVC 6.0). I'm thinking it's a compiler bug, has anyone > found a workaround? > > Thanks! > Chris >
