Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Example for Rule8.10 (inline function)
#2
Hello Wolfgang

To comply with MISRA C:2012 Rule 8.10, the function should be declared with the static storage class, within the header file:

Code:
inline [i][b]static[/b][/i] void function1(int a, int b)
{
...
return;
}

Following inclusion of the header file in a source module, this declaration is visible, but only to the module(s) that have included the header file.
Posted by and on behalf of the MISRA C Working Group


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)