Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MISRA C:1998 Rule 113
#1
Hello All.

I am running the comercial RTOS Salvo through the MISRA checker as implemented in IAR's EWARM v4.20A tool suite.

I have a struct called ecb which in turn contains a field called tcbP. ecbP is a pointer to the struct ecb. OSeligQP is a pointer to a struct tcb.

The IAR MISRA checker complains about a call to a function

Code:
OSInsPrioQ(OScTcbP, &(ecbP->tcbP));

whereas it's fine with

Code:
OSInsPrioQ(OScTcbP, &OSeligQP);

Now, I admit that I do not know MISRA views passing a parameter by reference, but it certainly doesn't disallow it. In my example, a member of a struct is being passed by reference (not by value), and is being accessed by name, as per MISRA.

So, is this legal in MISRA-C?

Thanks for any and all input.

--Andrew
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)