Rule 2.1 deviation permit?

Moderators: misra-c, david ward

Post Reply
dg1980
Posts: 109
Joined: Wed Apr 27, 2016 2:33 pm
Company: Elektrobit Automotive GmbH

Rule 2.1 deviation permit?

Post by dg1980 » Wed Oct 19, 2016 3:15 pm

Typically, on embedded systems with a simple RTOS, main is used as background task, so it never returns:

Code: Select all

int main(void)
{
  Setup_Rtos();
  for (;;)
  {
    Background_Task();
  }
  return 0;// Violates MISRA C 2012 2.1: unreachable code
}
Would this be a candidate for your deviation permits document?

misra-c
Posts: 556
Joined: Thu Jan 05, 2006 1:11 pm

Re: Rule 2.1 deviation permit?

Post by misra-c » Fri Dec 09, 2016 9:01 am

Thank you for your suggestion for a deviation permit.
---
Posted by and on behalf of
the MISRA C Working Group

Post Reply

Return to “7.2 Compilation and build”