Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MISRA 8.1
#2
It is difficult to provide a detailed comment without seeing more context.

SFR is presumably a function. If it were a macro then a violation of Rule 8.1 would not be expected and if it were a language extension then it would not conform to the ISO C language standard. Assuming that it is a function, the solution is to provide a suitable prototype declaration for it. There may even be such a declaration in a header file provided by the implementation.

In the case of main, the solution again is to provide a suitable declaration at some point prior to the function definition. The return type and the number of parameters along with their types is implementation-defined in a freestanding implementation so provided your declaration and definition match each other and also match the requirements of your implementation there should be no problem.
Posted by and on behalf of the MISRA C Working Group
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)