[previous] 3334 [next] This declaration of '%s' hides a more global declaration.
Declarations and definitions

This declaration will 'hide' an ordinary identifier declared previously at a wider scope. The previous declaration will remain hidden for the remainder of this scope. Usage of this identifier which might be intended to refer to the previous one will now refer to the local one.

This could be the result of trying to use the same identifier for more than one purpose. Objects, functions, typedefs and enumeration constants all share a common name space. Hiding of identifiers is confusing and dangerous and should be avoided.

For example:


/*PRQA S 2017,3210,3205,3408,3447 ++*/

extern int press;

void foo(void)
{
    float press;               /* Message 3334 */
}

See also:

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents