[previous] 3671 [next] Function called via pointer to function.
Functions

A function is being called through a function pointer.

For example:


/*PRQA S 1305,2213,3210,3227,3408,3447,3602,3674 ++*/

extern int f1(void);
extern int f2(void);
extern int f3(void);
extern int f4(void);

int (* const fp[])(void) = {&f1, &f2, &f3, &f4};

extern int foo(int n)
{
    int r;

    r = (*fp[n])();                     /* Message 3671 */

    return r;
}


No MISRA C:2012 Rules applicable to message 3671


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