[previous] MISRA C:2012  Rule-8.10:  (Required) [next] An inline function shall be declared with the static storage class

Example Code:


#pragma PRQA_MESSAGES_OFF 1055,2984,3408

#include "misra.h"
#include "m3cmex.h"

static inline int16_t rule_0810a(int16_t a)
{
    return a * 2;
}

extern inline int16_t rule_0810b(int16_t a)
{                                                       /* 3243 */
    return a * 2;
}

inline int16_t rule_0810c(int16_t a)                    /* 3240 */
{
    return a * 2;
}


extern int16_t rule_0810( void )
{
   int16_t r = 0;

   r = r + rule_0810a(1);
   r = r + rule_0810b(2);
   r = r + rule_0810c(3);

   return r;
}


QAC messages that encompass this guideline:

3240 inline function '%s' is being defined with external linkage.
3243 inline function '%s' is also an 'external definition'.



(c) The Motor Industry Research Association, 2012
QA C Source Code Analyser 8.1.2
MISRA C:2012 Compliance Module 1.0
© 2013 Programming Research
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents