다음을 통해 공유


PREfast Warning 245 (Windows CE 5.0)

Send Feedback

245 - For-init declaration of <variable> hides global declaration.
Additional Information: See previous declaration at <location>.

This warning indicates that a declaration in a for initializer has the same name as a declaration at global scope and hides the global declaration.

You must understand how the lifetimes of these definitions overlap to determine whether there is a problem with this code. PREfast only identifies a scope overlap.

If the lifetimes of the variables overlap, a problem could exist.

What to look for when investigating this warning:

  • Is the intent a single variable or multiple variables?
  • Is an allocation saved in one variable and freed by the other?
  • Is the correct result being returned?

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.