[previous] 1330 [next] The parameter identifiers in this function declaration differ from those in a previous declaration.
Functions

The names of parameters in this function declaration are different from the names in a previous declaration.

It is good practice to be consistent in the use of function parameter names. If a parameter name in a function definition differs from the corresponding identifier in the declaration, it could indicate that a change in the specification of the function that has not been completed.

For example:


/*PRQA S 2017,3198,3199,3203,3206,3447,3672 ++*/

extern void foo ( int tom, long dick);

extern void (*pf)(int tom, long derek);

extern void foo ( int tom, long dave)                           /* Message 1330 */
{
    void (*pfx)(int tom, long donald);

    pfx = pf;                                                   /* Message 1334 */

    pf = &foo;                                                  /* Message 1334 */
}


MISRA C:2012 Rules applicable to message 1330:

Rule-8.3  (Required) All declarations of an object or function shall use the same names and type qualifiers


QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents