In C++ you can initialize a variable in an if statement, like so:
if (CThing* pThing = GetThing()) { }
Why would one consider this bad or g
You can also enclose the assignment in an extra set of ( ) to prevent the warning message.